/* enjoyGraz Tour Guide — Print styles v3.0.0 */

/* ── Hidden on screen, shown only when printing ── */
.egtg-poi-print-legend { display: none; }
.egtg-print-header     { display: none; }

/* ══════════════════════════════════════════════════════════════════════════ */
@media print {

  /* ── Page: landscape, comfortable margins ── */
  @page {
    size: A4 landscape;
    margin: 0.9cm 1.2cm;
  }

  /* ── Isolate the tour widget ── */
  body * { visibility: hidden !important; }

  .egtg-tour-wrap,
  .egtg-tour-wrap *,
  .egtg-print-header,
  .egtg-print-header * { visibility: visible !important; }

  /* ── Reset tour container ── */
  .egtg-tour-wrap {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  /* ── Hide interactive / screen-only elements ── */
  .egtg-main,
  .egtg-audio-panel,
  .egtg-map,
  .egtg-controls,
  .egtg-lang-row,
  .egtg-lang-pills,
  .egtg-gallery,
  .egtg-progress-bar,
  .egtg-print-btn,
  .egtg-translate-btn,
  .egtg-guide-btn,
  .egtg-weather-btn,
  .egtg-basket-btn,
  .egtg-header-btns,
  .epb-open-btn,
  .egtg-desc-toggle { display: none !important; }

  /* ── Hide all fixed-position overlays (weather, photobox, basket, etc.) ── */
  .egtg-weather-modal,
  #egtg-weather-modal,
  #egtg-photobox-modal,
  #egtg-basket-btn,
  #egtg-basket-modal,
  #egtg-access-overlay,
  #egtg-lightbox,
  .egtg-intro-overlay,
  .egtg-poi-control,
  .egtg-locate-control,
  .egtg-map-toast,
  .egtg-google-translate { display: none !important; visibility: hidden !important; }

  /* ── Tour inner: full page ── */
  .egtg-tour-inner {
    display: block !important;
    overflow: visible !important;
  }

  /* ── Sidebar: full width ── */
  .egtg-sidebar {
    width: 100% !important;
    max-height: none !important;
    border: none !important;
    overflow: visible !important;
    background: #fff !important;
  }

  /* ════════════════════════════════════════════════════════════════════════
     DYNAMIC PRINT HEADER
  ══════════════════════════════════════════════════════════════════════════ */
  .egtg-sidebar-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 0 20px !important;
    padding: 0 0 10px !important;
    margin-bottom: 14px !important;
    border-bottom: none !important;
    background: linear-gradient(135deg, #0a5c45 0%, #1D9E75 55%, #2db87f 100%) !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    color: #fff !important;
  }

  .egtg-sidebar-header-text {
    width: auto !important;
    flex: none !important;
  }

  .egtg-brand {
    color: rgba(255,255,255,0.65) !important;
    letter-spacing: .14em !important;
    font-size: 9px !important;
    margin-bottom: 3px !important;
  }
  .egtg-tour-title {
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #fff !important;
    margin: 0 0 3px !important;
    line-height: 1.2 !important;
  }
  .egtg-tour-desc {
    font-size: 11px !important;
    color: rgba(255,255,255,0.78) !important;
    margin: 0 !important;
    display: block !important;
    max-width: 480px !important;
  }

  /* Print meta: stop count + date — injected by JS or static */
  .egtg-print-meta {
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    color: rgba(255,255,255,0.85) !important;
    font-size: 11px !important;
  }
  .egtg-print-meta-stops {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1 !important;
  }
  .egtg-print-meta-label {
    font-size: 9px !important;
    text-transform: uppercase !important;
    letter-spacing: .1em !important;
    color: rgba(255,255,255,.6) !important;
  }
  .egtg-print-date {
    font-size: 10px !important;
    color: rgba(255,255,255,.55) !important;
    margin-top: 6px !important;
  }

  /* ════════════════════════════════════════════════════════════════════════
     STOPS GRID — 3 columns, landscape
  ══════════════════════════════════════════════════════════════════════════ */
  .egtg-stops-list {
    overflow: visible !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 7px 10px !important;
    padding: 0 !important;
    align-items: start !important;
  }

  /* ── Individual stop card ── */
  .egtg-stop-item {
    display: grid !important;
    grid-template-columns: 28px 1fr auto !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    margin: 0 !important;
    background: #fff !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* Left accent bar per stop */
  .egtg-stop-item::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important; top: 0 !important; bottom: 0 !important;
    width: 3px !important;
    background: #e0e0e0 !important;
    border-radius: 8px 0 0 8px !important;
  }
  .egtg-stop-item.active::before  { background: #0072f5 !important; }
  .egtg-stop-item.visited::before { background: #1D9E75 !important; }

  /* Dot */
  .egtg-stop-dot {
    width: 26px !important; height: 26px !important;
    border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 11px !important; font-weight: 800 !important;
    flex-shrink: 0 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
  .egtg-stop-dot.visited {
    background: #1D9E75 !important;
    color: #fff !important;
  }
  .egtg-stop-dot.current {
    background: #0072f5 !important;
    color: #fff !important;
  }
  .egtg-stop-dot.upcoming {
    background: #f4f4f4 !important;
    color: #aaa !important;
    border: 1px solid #e0e0e0 !important;
  }

  .egtg-stop-info {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .egtg-stop-name-text {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #111 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  .egtg-stop-sub-text {
    display: block !important;
    font-size: 10px !important;
    color: #999 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .egtg-stop-dur {
    display: block !important;
    font-size: 10px !important;
    color: #bbb !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* ── POI print legend ── */
  .egtg-poi-print-legend {
    display: block !important;
    margin-top: 14px !important;
    padding-top: 10px !important;
    border-top: 1px solid #e8e8e8 !important;
    font-size: 11px !important;
    color: #555 !important;
    column-count: 3 !important;
    column-gap: 16px !important;
  }

  /* ── Print footer ── */
  .egtg-print-footer {
    display: block !important;
    margin-top: 12px !important;
    padding-top: 8px !important;
    border-top: 1px solid #e8e8e8 !important;
    font-size: 9px !important;
    color: #bbb !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .egtg-print-footer strong { color: #1D9E75 !important; }

  /* Force color printing for key accents */
  * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
}
