/* ==========================================================================
   GUIDED TOUR MODAL STYLES (THEME-AWARE & HIGH-CONTRAST)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Modal Frame & Custom Scrollbar
   -------------------------------------------------------------------------- */
.tour-modal-overlay {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tour-modal-card {
  position: relative;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  clip-path: inset(0 round 1.5rem);
}

html.dark .tour-modal-card {
  background-color: #0f2033;
  color: #f1f5f9;
  border-color: #1f3550;
}

/* Custom Scrollbar */
.tour-modal-card::-webkit-scrollbar {
  width: 8px;
}

.tour-modal-card::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 1.75rem;
}

.tour-modal-card::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}

html.dark .tour-modal-card::-webkit-scrollbar-thumb {
  background-color: #334155;
}

/* Modal Scroll-To-Top Button Alignment (Enforce Bottom Right Edge Placement) */
.modal-scroll-top-btn {
  position: relative !important;
  bottom: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  z-index: 70 !important;
}

/* --------------------------------------------------------------------------
   2. Headings & High-Contrast Typography
   -------------------------------------------------------------------------- */
.tour-modal-card h2 {
  color: #0f172a !important;
}

html.dark .tour-modal-card h2 {
  color: #ffffff !important;
}

.modal-section-heading {
  color: #0284c7 !important;
  font-weight: 700 !important;
}

html.dark .modal-section-heading {
  color: #38bdf8 !important;
}

/* Enforce Body Text Contrast inside Accent Cards */
.modal-card-accent:not(.modal-destination-card) p,
.modal-card-accent:not(.modal-destination-card) span:not(.modal-section-heading),
.modal-card-accent:not(.modal-destination-card) li,
.modal-card-accent:not(.modal-destination-card) td {
  color: #0f172a !important;
  font-weight: 500;
}

html.dark .modal-card-accent:not(.modal-destination-card) p,
html.dark .modal-card-accent:not(.modal-destination-card) span:not(.modal-section-heading),
html.dark .modal-card-accent:not(.modal-destination-card) li,
html.dark .modal-card-accent:not(.modal-destination-card) td {
  color: #e2e8f0 !important;
}

/* --------------------------------------------------------------------------
   3. Cards & Panels
   -------------------------------------------------------------------------- */
/* Common Card Transitions */
.modal-card-accent,
.modal-item-card,
.modal-pricing-strip,
.modal-price-box-enhanced {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Accent Card Base */
.modal-card-accent {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0f172a !important;
}

html.dark .modal-card-accent {
  background-color: rgba(8, 47, 73, 0.35);
  border-color: rgba(14, 116, 144, 0.45);
  color: #f1f5f9 !important;
}

/* Item Cards (Personnel & Flight Hubs) */
.modal-item-card {
  background-color: #ffffff;
  border: 1px solid #bae6fd;
  color: #0f172a;
}

.modal-item-card p,
.modal-item-card .item-value {
  color: #0f172a !important;
}

html.dark .modal-item-card {
  background-color: #0c1b2c;
  border-color: #1f3550;
  color: #f1f5f9;
}

html.dark .modal-item-card p,
html.dark .modal-item-card .item-value {
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   4. Pricing & Destination Cards
   -------------------------------------------------------------------------- */
.modal-pricing-strip {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
}

html.dark .modal-pricing-strip {
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(14, 116, 144, 0.45);
}

.modal-price-box-enhanced {
  background-color: #ffffff;
  border: 1px solid #bae6fd;
}

html.dark .modal-price-box-enhanced {
  background-color: #0c1b2c;
  border-color: #1f3550;
}

/* Clear, Low-Opacity Overlay Plate for Destination Cards */
.modal-destination-box {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.4) 100%) !important;
  border-top: 1px solid rgba(186, 230, 253, 0.6) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.dark .modal-destination-box {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.45) 100%) !important;
  border-top-color: rgba(14, 116, 144, 0.4) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.modal-destination-box .hotel-title {
  color: #0f172a !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

html.dark .modal-destination-box .hotel-title {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.modal-destination-box .hotel-dates {
  color: #0f172a !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

html.dark .modal-destination-box .hotel-dates {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   5. Theme Utilities & Modal Shells
   -------------------------------------------------------------------------- */
html:not(.dark) .img-on-dark {
  display: none !important;
}

html.dark .img-on-light {
  display: none !important;
}
/* Modal shells must remain opaque even when theme utilities or backdrop
   effects are active. Keep transparency only on the overlay itself. */
.tour-modal-card,
.package-modal-card,
.flyer-preview-modal-card {
  background-color: #ffffff !important;
  background-image: none;
  opacity: 1;
  isolation: isolate;
}

html.dark .tour-modal-card,
html.dark .package-modal-card,
html.dark .flyer-preview-modal-card {
  background-color: #0f2033 !important;
  color: #f1f5f9;
}

.tour-modal-overlay,
.package-modal-overlay,
.flyer-preview-modal-overlay {
  background-color: rgba(15, 23, 42, 0.82) !important;
}

.flyer-preview-modal-card {
  border-color: #cbd5e1;
}

html.dark .flyer-preview-modal-card {
  border-color: #29445f;
}
