/* ==========================================================================
   ROBS MANCUSO - EDITORIAL PDF & PRINT STYLESHEET
   ========================================================================== */

.pdf-preview-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pdf-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.pdf-control-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Printable Magazine Document Sheet */
.pdf-document {
  background-color: #FFFFFF;
  box-shadow: var(--shadow-xl);
  border-radius: 4px;
  overflow: hidden;
  color: #1A1715;
  font-family: var(--font-sans);
}

/* Editorial PDF Cover Page */
.pdf-cover-page {
  position: relative;
  background: linear-gradient(145deg, #181513 0%, #2A241F 60%, #3B3026 100%);
  color: #FFFFFF;
  padding: 5rem 4rem 4rem;
  min-height: 750px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  page-break-after: always;
}

.pdf-cover-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.pdf-cover-logo {
  height: 80px;
  filter: brightness(0) invert(1);
}

.pdf-cover-badge {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--brand-gold);
  text-transform: uppercase;
}

.pdf-cover-main {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 3rem 0;
}

.pdf-cover-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 700;
  color: #FAF6F0;
}

.pdf-cover-subtitle {
  font-size: 1.25rem;
  color: #D6C8B8;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.pdf-cover-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  font-size: 0.9rem;
  color: #D6C8B8;
}

.pdf-cover-traveler {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pdf-cover-signature {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pdf-cover-signature a {
  color: var(--brand-gold);
  text-decoration: none;
  font-weight: 600;
}

/* Interior Pages Header & Footer */
.pdf-page {
  padding: 3rem 3.5rem;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  page-break-after: always;
  position: relative;
  min-height: 900px;
}

.pdf-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E5DFD5;
  padding-bottom: 1rem;
}

.pdf-header-brand-logo {
  height: 38px;
}

.pdf-header-meta {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.pdf-page-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #E5DFD5;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.pdf-footer-insta {
  color: var(--brand-terracotta);
  font-weight: 600;
  text-decoration: none;
}

/* Day Block in PDF */
.pdf-day-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  page-break-inside: avoid;
}

.pdf-day-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #F8F5F0;
  border-left: 4px solid var(--brand-terracotta);
  padding: 0.85rem 1.25rem;
  border-radius: 0 8px 8px 0;
}

.pdf-day-num {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-terracotta);
  letter-spacing: 0.08em;
}

.pdf-day-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #1A1715;
}

.pdf-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pdf-timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.25rem;
  align-items: start;
  page-break-inside: avoid;
}

.pdf-item-time {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-terracotta);
}

.pdf-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed #EAE3D8;
}

.pdf-item-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #1A1715;
}

.pdf-item-desc {
  font-size: 0.9rem;
  color: #4A443E;
  line-height: 1.5;
}

.pdf-item-tip {
  font-size: 0.85rem;
  color: #78521C;
  background-color: #FAF4EB;
  border-left: 2px solid var(--brand-gold);
  padding: 0.4rem 0.75rem;
  margin-top: 0.35rem;
  border-radius: 0 4px 4px 0;
}

.pdf-item-links {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdf-link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #C05A3E;
  background: #FAF3E8;
  border: 1px solid #EADBBE;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  text-decoration: underline;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-link-action:hover {
  background: #C05A3E;
  color: #FFFFFF;
  text-decoration: none;
}

/* Checklist Page in PDF */
.pdf-checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
  page-break-inside: avoid;
}

.pdf-checklist-card, .pdf-checklist-box {
  background: #FAF8F5;
  border: 1.5px solid #EADBBE;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  page-break-inside: avoid;
}

.pdf-checklist-cat-title, .pdf-checklist-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #C05A3E;
  border-bottom: 1.5px solid #EADBBE;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pdf-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #2D2723;
  line-height: 1.4;
}

.pdf-box, .pdf-square {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #C05A3E;
  border-radius: 4px;
  background-color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  flex-shrink: 0;
}

.pdf-box.checked, .pdf-square.checked {
  background-color: #C05A3E;
  border-color: #C05A3E;
  color: #FFFFFF;
}

.pdf-box.checked::after, .pdf-square.checked::after {
  content: '✓';
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
}

.pdf-check-text {
  flex: 1;
  font-size: 0.88rem;
  color: #2D2723;
}

.pdf-check-text.checked {
  color: #7A7268;
}

/* Alternative Choice Group in PDF */
.pdf-alternative-group-box {
  background: #FAF6F0;
  border: 1.5px solid #EADBBE;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  page-break-inside: avoid;
}

.pdf-alt-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed #D5B887;
  margin-bottom: 0.75rem;
}

.pdf-alt-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pdf-alt-option-card {
  background: #FFFFFF;
  border: 1px solid #EADBBE;
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
}

/* ==========================================================================
   NATIVE PRINT & PDF EXPORT OPTIMIZATION
   ========================================================================== */
@media print {
  /* 1. Hide all navigation, headers, footers, toolbars, buttons, sidebars and system UI */
  #app-header-mount,
  .app-header,
  #app-footer-mount,
  .app-footer,
  #app-modals-mount,
  .modal-overlay,
  .modal-container,
  .pdf-screen-toolbar,
  .pdf-control-bar,
  .toast-container,
  .quick-prompts-bar,
  .chat-input-wrapper,
  .chat-assistant-container,
  .studio-container,
  .day-selector-container,
  .map-panel-card,
  #leaflet-map-container,
  button,
  .btn-primary,
  .btn-secondary,
  .btn-icon {
    display: none !important;
    visibility: hidden !important;
  }

  /* 2. Reset page container for full width clean document */
  html, body {
    background: #FFFFFF !important;
    color: #1A1715 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .main-view-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .pdf-viewer-screen {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 3. Document Styling for Print / PDF Export */
  .pdf-editorial-document, .pdf-document {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .pdf-page, .pdf-cover-page {
    box-shadow: none !important;
    border: none !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    width: 100% !important;
    page-break-after: always;
  }

  .pdf-hero-section {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .pdf-day-banner {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-after: avoid;
  }

  .pdf-timeline-item {
    page-break-inside: avoid;
  }

  .pdf-alternative-group-box {
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .pdf-checklist-card, .pdf-checklist-box {
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4 portrait;
    margin: 12mm 15mm;
  }
}
