/**
 * TourFlow Shortcodes Styles
 *
 * Hybrid approach: We control layout structure and mobile responsiveness,
 * but inherit WooCommerce/theme colors, fonts, and button styles.
 *
 * @package TourFlow
 * @since   1.9.0
 */

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.tourflow-tours-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}

/* Column variations */
.tourflow-tours-columns-1 {
  grid-template-columns: 1fr;
}

.tourflow-tours-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.tourflow-tours-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tourflow-tours-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Tablet: 2 columns max */
@media (max-width: 992px) {
  .tourflow-tours-columns-3,
  .tourflow-layout-square {
  /*
     We remove explicit grid-template-columns here so that the utility classes
     (e.g. .sky-card-grid-columns-3) applied by PHP can take effect.
     Default is handled by PHP falling back to 2 columns if not specified.
  */
  gap: 1.5rem; /* Ensure consistent gap */
}
}

/* Mobile: Always 1 column */
@media (max-width: 768px) {
  .tourflow-tours-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   List Layout
   ========================================================================== */

.tourflow-tours-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}

.tourflow-tours-list .tourflow-tour-card {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

.tourflow-tours-list .tourflow-tour-image {
  flex: 0 0 35%;
  max-width: 350px;
}

.tourflow-tours-list .tourflow-tour-content {
  flex: 1;
}

/* Mobile: Stack list items vertically */
@media (max-width: 768px) {
  .tourflow-tours-list .tourflow-tour-card {
    flex-direction: column;
  }

  .tourflow-tours-list .tourflow-tour-image {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }
}

/* ==========================================================================
   Product Card (Both Layouts)
   ========================================================================== */

.tourflow-tour-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  overflow: hidden;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.tourflow-tour-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Image */
.tourflow-tour-image {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  line-height: 0;
}

.tourflow-tour-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.tourflow-tour-card:hover .tourflow-tour-image img {
  transform: scale(1.05);
}

/* Content area */
.tourflow-tour-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

/* Title - inherit theme heading styles */
.tourflow-tour-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
}

.tourflow-tour-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.tourflow-tour-title a:hover {
  color: inherit;
  opacity: 0.8;
}

/* Excerpt */
.tourflow-tour-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

.tourflow-tour-excerpt p:last-child {
  margin-bottom: 0;
}

/* Price - inherits WooCommerce price styling */
.tourflow-tour-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: auto;
  padding-top: 0.5rem;
}

/*
 * Allow theme's WooCommerce price styles to apply
 * Common WooCommerce price classes will style this automatically
 */
.tourflow-tour-price .amount {
  color: inherit;
}

.tourflow-tour-price del {
  opacity: 0.6;
  font-size: 0.9em;
  margin-right: 0.5rem;
}

.tourflow-tour-price ins {
  text-decoration: none;
  font-weight: 700;
}

/* Button - inherits WooCommerce/theme button styles */
.tourflow-tour-button {
  margin-top: 0.5rem;
}

.tourflow-tour-button .button,
.tourflow-tour-button .tourflow-book-button {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 600;
}

/*
 * Fallback button styles if theme doesn't provide them
 * These will be overridden by most WooCommerce themes
 */
.tourflow-tour-button .button:not([class*="wp-element-button"]) {
  background-color: #0071a1;
  color: #fff;
  border: none;
}

.tourflow-tour-button .button:not([class*="wp-element-button"]):hover {
  background-color: #005177;
  color: #fff;
}

	/* ==========================================================================
	   No Products Message
	   ========================================================================== */
	
	.tourflow-no-products {
	  text-align: center;
	  padding: 2rem;
	  color: #666;
	  font-style: italic;
	  margin: 2rem 0;
	  border: 1px dashed #ddd;
	  border-radius: 4px;
	  background: #f9f9f9;
	}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.tourflow-tour-card:focus-within {
  outline: 2px solid #0071a1;
  outline-offset: 2px;
}

/* Screen reader text */
.tourflow-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .tourflow-tour-button {
    display: none;
  }

  .tourflow-tour-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ==========================================================================
   Square Gallery Layout
   ========================================================================== */

/* Grid Overrides for Square Layout */
/* We rely on the base .sky-card-grid for gap and margins. 
   We just need to override columns. */
.tourflow-layout-square {
  /* Default 2 columns if not specified, otherwise use shortcode value */
  grid-template-columns: repeat(var(--tourflow-grid-cols, 2), 1fr);
}

/* Column variations for Square Layout - legacy fallbacks */
.tourflow-layout-square.sky-card-grid-columns-1 {
  grid-template-columns: 1fr;
}

.tourflow-layout-square.sky-card-grid-columns-3 {
  grid-template-columns: repeat(var(--tourflow-grid-cols, 3), 1fr);
}

.tourflow-layout-square.sky-card-grid-columns-4 {
  grid-template-columns: repeat(var(--tourflow-grid-cols, 4), 1fr);
}

/* Responsive Overrides */
@media (max-width: 992px) {
  /* For square layouts, tablet collapses to max 2 columns, but respects 1 if set */
  .tourflow-layout-square {
    grid-template-columns: repeat(min(var(--tourflow-grid-cols, 2), 2), 1fr);
  }
  
  .tourflow-layout-square.sky-card-grid-columns-3,
  .tourflow-layout-square.sky-card-grid-columns-4 {
    grid-template-columns: repeat(min(var(--tourflow-grid-cols, 3), 2), 1fr);
  }
}

@media (max-width: 768px) {
  .tourflow-layout-square {
    grid-template-columns: 1fr !important;
  }
}

/* 
 * Square Card Modifier (.tourflow-card-square)
 * Extends .sky-card-wrapper structure
 */

.tourflow-card-square {
  /* Enforce square aspect ratio */
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  /* Ensure height is auto to respect aspect ratio, overriding any inline height */
  height: auto !important; 
  /* Safari/Webkit Mask Fix for separation */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  transform: translateZ(0);
  text-decoration: none !important; /* Prevent global link underlines */
  border: none !important; /* Prevent border underlines */
}

/* Background Image Adjustments */
.tourflow-card-square .sky-card-bg {
  /* Ensure it covers the square area */
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.tourflow-card-square:hover .sky-card-bg {
  transform: scale(1.1);
  -webkit-transform: scale(1.1);
}

/* Content Layout Overrides */
.tourflow-card-square .sky-card-content {
  /* Center content for square layout */
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  /* Position context for ::before gradient pseudo-element */
  position: relative;
}

/* Square card overlay — gradient controlled by inline opacity on .sky-card-overlay */
.tourflow-card-square .sky-card-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.85) 100%
  );
  transition: opacity 0.3s ease;
}

.tourflow-card-square:hover .sky-card-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

/* Title Overrides */
/* Title Overrides */
.tourflow-card-square .sky-card-title {
  font-size: 2rem; /* Increased from 1.5rem */
  margin-bottom: 0;
  text-decoration: none !important;
  border-bottom: none !important;
  /* Keep title centered and static or slight movement */
  transform: translateY(0); 
  transition: transform 0.3s ease;
  -webkit-transition: -webkit-transform 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.tourflow-card-square .sky-card-title a,
.tourflow-card-square a.sky-card-title {
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important; /* Remove Astra link underlines */
  color: #fff !important;
}

/* Hide any theme or plugin added pseudo-elements (underlines) */
.tourflow-card-square .sky-card-title::after,
.tourflow-card-square .sky-card-title::before {
  display: none !important;
  content: none !important;
  border: none !important;
  width: 0 !important;
  height: 0 !important;
}

.tourflow-card-square:hover .sky-card-title {
  /* Optional: move slightly up on hover */
  transform: translateY(-10px);
  -webkit-transform: translateY(-10px);
}

/* Hover Info (Duration & Price) */
.tourflow-square-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
}

.tourflow-card-square:hover .tourflow-square-info {
  opacity: 1;
  transform: translateY(0);
  -webkit-transform: translateY(0);
}

/* Info Text Styles */
.tourflow-square-duration,
.tourflow-square-price {
  font-size: 1.2rem; /* Increased from 1rem */
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.tourflow-square-price .amount {
  color: #fff !important;
}

.tourflow-square-price del {
  display: none; /* Hide original price to keep it clean */
}

.tourflow-square-price ins {
  text-decoration: none;
}

/* ==========================================================================
   Wizard UI Overrides
   ========================================================================== */

/* Full-Screen Overlay */
.tourflow-wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    bottom: 0;
    height: auto;
    overflow-y: auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 90;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    padding-bottom: 80px;
}

/* Dark tint layer — position:absolute so it grows with scroll content on all browsers
   including Safari (position:fixed tints only cover the viewport and don't grow).
   z-index:1 sits above the background image, below z-index:2 glass container. */
.tourflow-wizard-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
    pointer-events: none;
}

/* Fix Input Paralysis: Banner Z-Index & Interaction */
.tourflow-experience-banner {
    /* No Z-Index - Letting natural stacking order work */
    position: relative;
    pointer-events: none !important; /* Allow clicks to pass through */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}



/* The Wizard Container (Glass Effect) & form interaction */
.tourflow-summary-page {
    position: relative;
    z-index: 3; /* Sits above ::after tint (z-index:1) and any overlay children */
    pointer-events: auto !important; /* Force interaction */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 15px 25px; /* Aggressively reduced per user request */
    border-radius: 12px;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto 40px auto;
}

/* Ensure Button is clickable */
.tourflow-next-step-btn, .tourflow-prev-step {
    pointer-events: auto !important;
    position: relative;
}

/* Header */
.tourflow-wizard-header {
    text-align: center;
    margin-bottom: 10px; /* Reduced from 25px */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px; /* Reduced from 15px */
}

.tourflow-wizard-header h2 {
    font-size: 2rem;
    color: #FFFFFF; /* High contrast white */
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8); /* Strong shadow for readability */
}

.tourflow-wizard-subheader {
    font-size: 1rem;
    color: #FFFFFF; /* High contrast white */
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Progress Bar - Minimalist High Contrast Style */
.tourflow-wizard-progress {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0; /* Reduced from 30px */
    border: none;
    background: transparent;
}

/* Step Styles */
.tourflow-progress-step {
    position: relative;
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: #FFFFFF; /* High contrast white */
    font-weight: 500;
    opacity: 0.8; /* Slightly higher opacity for visibility */
    text-shadow: 0 1px 3px rgba(0,0,0,0.8); /* Text shadow for readability */
}

/* Ensure labels are visible */
.tourflow-progress-step .step-label {
    display: inline-block;
    margin-left: 0; /* no leading gap now that the step number is hidden */
    color: #fff; /* Ensure text is white */
}

/* Hide the step NUMBER in the booking wizard — show only the step name.
   State (active/completed) lives on .tourflow-progress-step, not on .step-number,
   so hiding the digit is safe. Scoped to the wizard bar (.tourflow-progress-step);
   the My Account .tourflow-progress-bar numbers are intentionally left untouched. */
.tourflow-progress-step .step-number {
    display: none !important;
}

/* Ensure step numbers/text are white */
.tourflow-progress-bar .tourflow-step,
.tourflow-progress-bar .tourflow-step .step-label {
    color: #fff !important;
}

.tourflow-progress-bar .tourflow-step .step-number {
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}

.tourflow-progress-bar .tourflow-step.active .step-number {
    background-color: #fff;
    color: var(--ast-global-color-0, #0071a1);
    font-weight: bold;
}

/* Active Step Styling */
.tourflow-progress-step.is-active {
    color: #FFFFFF; /* White */
    opacity: 1; /* Full opacity */
    font-weight: 700;
    border-bottom: 2px solid var(--ast-global-color-0, #14abc4); /* Active border */
}

/* Completed Step Styling */
.tourflow-progress-step.is-completed {
    color: var(--ast-global-color-0, #14abc4); 
    opacity: 1;
    text-shadow: none; /* Optional: remove shadow if color is bright enough, but keeping safe */
}

.tourflow-progress-step::before {
    display: none; 
}


/* Labels - Force Astra Branding Color */
.tourflow-summary-page label {
    color: var(--ast-global-color-0, #333);
    font-weight: 600;
}

/* Form Groups */
.tourflow-passenger-group {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.tourflow-passenger-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--ast-global-color-1, #333);
}

/* Buttons */
.tourflow-wizard-navigation {
    margin-top: 30px;
}

.tourflow-wizard-navigation .button {
    /* Ensure buttons look like Astra buttons / text color is readable */
    min-width: 120px;
    background-color: var(--ast-global-color-0, #0071a1);
    color: var(--ast-global-color-5, #fff);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tourflow-wizard-navigation .button:hover {
    background-color: var(--ast-global-color-1, #005177); /* Slightly darker */
    color: var(--ast-global-color-5, #fff);
}

/* Hide steps inactive */
.tourflow-wizard-step {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Phase 2 Sprint D: Sticky Command Center & Extras Gallery
   ========================================================================== */

/* 1. Sticky Command Center */
.tourflow-sticky-command-center {
    position: sticky;
    top: 0;
    z-index: 100; /* Above wizard content */
    background: rgba(255, 255, 255, 0.15); /* Slightly more opaque than container */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin: -40px -40px 30px -40px; /* Counteract container padding */
    border-radius: 12px 12px 0 0; /*  rounded top corners to match container */
}

.tf-cc-left, .tf-cc-center, .tf-cc-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tf-cc-left { align-items: flex-start; flex: 1; }
.tf-cc-center { align-items: center; flex: 1; }
.tf-cc-right { align-items: flex-end; flex: 1; }

.tf-cc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.tf-cc-date, .tf-cc-time {
    font-size: 0.9rem;
    color: #eee;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.tf-cc-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    color: #fff;
}

.tourflow-sticky-total {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ast-global-color-0); /* Accent color */
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}


/* 2. Extras 3-Column Grid */
.tourflow-extras-grid {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Reduced from 10px */
}

/* [LEGACY BLOCKS REMOVED — consolidated into Boutique Overrides below] */


/* Col 1: Name */
.tf-extra-col-name {
    display: flex;
    flex-direction: column;
}

.tf-group-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 2px;
}

.tf-extra-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Col 2: Details Link */
.tf-extra-col-details {
    text-align: center;
}

.tourflow-view-details {
    font-size: 0.9rem;
    color: var(--ast-global-color-0); /* Accent */
    text-decoration: none;
    border-bottom: 1px dashed var(--ast-global-color-0);
    transition: opacity 0.2s;
    cursor: pointer;
}

.tourflow-view-details:hover {
    opacity: 0.8;
}

/* Col 3: Action */
.tf-extra-col-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.tf-extra-price {
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
}

/* Toggle Switch Styles */
.tf-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.tf-toggle-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.tf-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.4);
    transition: .4s;
    border-radius: 24px;
}

.tf-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .tf-slider {
    background-color: var(--ast-global-color-0); /* Accent */
    border-color: var(--ast-global-color-0);
}

input:checked + .tf-slider:before {
    transform: translateX(16px);
}


/* 3. Details Modal Overrides */
/* 3. Details Modal Overrides */

/* Modal Backdrop / Wrapper */
#tourflow-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; /* Managed by JS */
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Handle tall content on small screens if needed */
    padding: 20px;
}

/* Passenger Replacement Confirmation Modal */
#tourflow-pax-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; /* Managed by JS */
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

#tf-pax-confirm-ok {
    background: linear-gradient(135deg, #50e3c2, #3db89a) !important;
    color: #fff !important;
}

/* Modal Content Box */
.tourflow-details-content {
    background: #1a1a1a; /* Fallback */
    background: linear-gradient(145deg, rgba(30,30,30,0.95), rgba(20,20,20,0.98));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    color: #fff;
    /* Reset inherited absolute positioning if any */
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
}

/* Modal Title */
#tf-modal-title {
    margin-top: 0;
    color: var(--ast-global-color-0);
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.tourflow-modal-footer {
    display: none !important; /* Hide footer if present */
}

/* [LEGACY BLOCKS REMOVED — consolidated into Boutique Overrides below] */


/* Modal Description */
#tf-modal-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 20px;
}

/* Modal Image */
#tf-modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


/* Close Button Hover */
.tourflow-close-modal:hover {
    color: #ff6b6b !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Header Stacking */
    .tourflow-sticky-header .tf-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tourflow-sticky-total {
        align-self: flex-end; /* Price to right on mobile? Or center? */
        font-size: 1.2rem;
    }
    
    .tf-tour-name {
        font-size: 1.5rem !important; /* Smaller on mobile */
    }

    /* Wizard Steps UX: Hide inactive steps to prevent header crunch */
    .tourflow-progress-step:not(.is-active):not(.active) {
        display: none !important;
    }
    .tourflow-progress-step.is-active, .tourflow-progress-step.active {
        width: 100%;
        text-align: center;
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
        border: none !important; /* Made borderless per request */
    }

    /* Container Height Bug Fix & Border Removal */
    .tourflow-sticky-header {
        border: none !important;
        box-shadow: none !important;
    }
    .tourflow-summary-page {
        border: none !important; /* Remove borders on mobile */
    }
    .tourflow-wizard-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }


    
    /* Static Actions Stacking */
    .tourflow-wizard-actions {
        flex-direction: column;
        gap: 15px;
    }
    .tf-actions-left, .tf-actions-right {
        width: 100%;
    }
    .tourflow-wizard-actions button {
        width: 100%;
    }
}
/* ==========================================================================
   Boutique Aviation Extras & Command Center
   ========================================================================== */

/* 1. Header — static block, not sticky (sticky breaks Safari stacking context inside overflow:auto) */
.tourflow-sticky-header {
    position: relative;
    z-index: 2;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* 1b. Actions Footer — static block (sticky breaks Safari stacking context inside overflow:auto) */
.tourflow-sticky-footer {
    position: relative;
    z-index: 3;
    padding-top: 10px;
    margin-top: 20px;
}

.tf-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tf-tour-name {
    font-size: 2.2rem !important; /* Force 2.2rem */
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 !important;
    line-height: 1.2;
}

.tf-header-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.tourflow-sticky-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ast-global-color-0); /* Teal */
    text-shadow: 0 0 10px rgba(80, 227, 194, 0.3);
}

/* 2. Group Headers (Teal Set - Transparent) */
.tourflow-extra-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent !important; /* NO Background */
    padding: 4px 0 2px 0; /* Minimized padding */
    margin-top: 8px; /* Reduced from 12px */
    margin-bottom: 4px; /* Reduced from 6px */
    border-bottom: 2px solid var(--ast-global-color-0); /* Bottom line only */
}

.tf-group-title {
    font-weight: 800; /* Extra Bold */
    text-transform: uppercase;
    font-size: 1.1em;
    color: var(--ast-global-color-0); /* Teal Text */
    letter-spacing: 1px;
}

/* 3. Nested Items & Teal Line */
.tourflow-extra-grid-item.is-child-of-group {
    position: relative;
    padding-left: 40px; /* Indent */
    border-left: none !important;
    width: 100%; /* Merged from legacy */
}

/* GHOST LINE KILLED — the short thick line on .tf-extra-col-name::before remains */
.tourflow-extra-grid-item.is-child-of-group::before {
    display: none !important;
    content: none !important;
}

/* 4. Link Styling */
.tourflow-view-details {
    color: rgba(255,255,255,0.8);
    text-decoration: underline !important;
    text-underline-offset: 3px;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}
.tourflow-view-details:hover {
    color: #fff;
    text-decoration-color: var(--ast-global-color-0) !important;
}

/* 5. Grid Item (Consolidated — single source of truth) */
.tourflow-extra-grid-item {
    display: grid;
    grid-template-columns: 3.5fr 0.8fr 1.7fr; /* Name (wide), Details, Price/Action */
    align-items: center;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0;
    padding: 6px 0; /* Tighter item spacing */
    transition: background 0.2s ease;
}
.tourflow-extra-grid-item:last-child {
    border-bottom: none !important;
}
.tourflow-extra-grid-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* 6. Custom Input Field Animation */
.tourflow-extra-custom-input {
    overflow: hidden; /* For smooth slide */
}
.tourflow-extra-custom-input input {
    transition: all 0.3s ease;
}
.tourflow-extra-custom-input input:focus {
    border-color: var(--ast-global-color-0) !important;
    background: rgba(0,0,0,0.4) !important;
    outline: none;
}

/* 7. Modal Cleanup */
#tourflow-details-modal .tourflow-details-content {
    background: #1f1f1f;
    border: 1px solid rgba(255,255,255,0.1);
    color: #eee;
}
#tourflow-details-modal .tourflow-close-modal {
    color: #fff !important;
    opacity: 0.7;
    font-size: 2rem;
    line-height: 1;
}
#tourflow-details-modal .tourflow-close-modal:hover {
    opacity: 1;
}
/* Dynamic height — Let the overlay handle the scrolling */
.tourflow-summary-page {
    height: auto;
    position: relative;
    z-index: 10;
}

/* =========================================
   Manifest Series: Custom Checkboxes
   ========================================= */

.tf-manifest-check-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-left: 0;
    margin-bottom: 0;
    margin-right: 0; /* Align perfectly to right */
    cursor: pointer;
    font-size: 22px;
    user-select: none;
    width: 24px;
    height: 24px;
}

/* Hide default checkbox */
.tf-manifest-check-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkmark Box */
.tf-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%; /* Circular for premium feel */
    transition: all 0.2s ease;
}

/* Hover: slightly brighter border */
.tf-manifest-check-container:hover input ~ .tf-checkmark {
    border-color: rgba(255, 255, 255, 0.6);
}

/* Checked State */
.tf-manifest-check-container input:checked ~ .tf-checkmark {
    background-color: var(--ast-global-color-0);
    border-color: var(--ast-global-color-0);
    box-shadow: 0 0 10px rgba(80, 227, 194, 0.4); /* Glow */
}

/* Checkmark Icon (Hidden by default) */
.tf-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show Checkmark when checked */
.tf-manifest-check-container input:checked ~ .tf-checkmark:after {
    display: block;
}

/* Style the checkmark (L-shape) */
.tf-manifest-check-container .tf-checkmark:after {
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
/* ==========================================================================
   Phase 3 FIX: Step 3 Internal Scrolling (Matching Step 2)
   ========================================================================== */

/* 
 * Make Step 3 container fill the available flex space defined by 
 * #tourflow-passenger-form (which has overflow:hidden)
 */
#tourflow-wizard-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#tourflow-wizard-summary::-webkit-scrollbar {
    width: 4px;
}
#tourflow-wizard-summary::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}
#tourflow-wizard-summary::-webkit-scrollbar-track {
    background: transparent;
}

/* Ensure children don't break the flow */
.tourflow-payment-legend {
    flex-shrink: 0; /* Let it take natural height */
}

/* 
 * The Checkout Embed needs to be contained.
 * We remove any potential overrides that might force it to expand.
 */
.tourflow-checkout-embed {
    width: 100%;
}
/* ==========================================================================
   Phase 3: Checkout Diet Overhaul (Aviation Instrument Style)
   ========================================================================== */

/* --- 1. Input Harmonization (Steps 1 & 3) --- */
.tourflow-summary-page input[type="text"],
.tourflow-summary-page input[type="email"],
.tourflow-summary-page input[type="tel"],
.tourflow-summary-page textarea,
.tourflow-summary-page select,
.tourflow-checkout-embed input[type="text"],
.tourflow-checkout-embed input[type="email"],
.tourflow-checkout-embed input[type="tel"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    border-bottom: 1px solid rgba(80, 227, 194, 0.5) !important; /* Teal, sleek */
    border-radius: 4px 4px 0 0 !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    padding: 12px 15px !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.tourflow-summary-page input:focus,
.tourflow-checkout-embed input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom-color: #50e3c2 !important; /* Bright Teal */
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.1) !important;
    outline: none !important;
}

/* Placeholder styling */
.tourflow-summary-page input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* --- 2. Typography Cleanup (Labels) --- */
.tourflow-summary-page label,
.tourflow-checkout-embed label {
    color: rgba(255, 255, 255, 0.9) !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
}

/* Hide "Optional" label if inherent */
.optional { visibility: hidden; }

/* --- 3. Layout Compaction (Single Column Billing) --- */
.tourflow-checkout-embed .woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tourflow-checkout-embed .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

/* Ensure no right-margin phantom space */
.tourflow-checkout-embed .col-1,
.tourflow-checkout-embed .col-2 {
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* --- 4. Redundancy Filter (Hide Unused Elements) --- */
/* Hide WooCommerce Order Review Table and Heading — BUT NOT .woocommerce-checkout-review-order itself (contains #payment) */
#tourflow-wizard-summary .tourflow-checkout-embed .woocommerce-checkout-review-order-table,
#tourflow-wizard-summary .tourflow-checkout-embed #order_review_heading,
#tourflow-wizard-summary .tourflow-checkout-embed h3#order_review_heading {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide Standard Place Order Button (Used via Proxy) */
.tourflow-checkout-embed #place_order {
    display: none !important;
}

/* Hide Sync Button (Removed per request) */
#tourflow-sync-passenger {
    display: none !important;
}

/* Hide Privacy Policy Text (Usually cluttered) */
.tourflow-checkout-embed .woocommerce-privacy-policy-text {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-bottom: 15px;
    text-align: center;
}

/* --- Hide Standard WC Coupon Form --- */
.tourflow-checkout-embed .woocommerce-form-coupon-toggle,
.tourflow-checkout-embed .woocommerce-form-coupon,
.tourflow-checkout-embed .checkout_coupon {
    display: none !important;
}

/* --- Hide ALL WC Inline Login Forms (replaced by modal/popup) --- */
.tourflow-checkout-embed .woocommerce-form-login-toggle,
.tourflow-checkout-embed .woocommerce-form-login,
.tourflow-checkout-embed .woocommerce-form-login-toggle + .login,
.tourflow-checkout-embed form.login,
.tourflow-checkout-embed .col2-set .col-1 .login,
.tourflow-checkout-embed .u-column1 .login,
#tourflow-wizard-summary .woocommerce-form-login-toggle,
#tourflow-wizard-summary .woocommerce-form-login,
#tourflow-wizard-summary form.login {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Login Modal Styles (Glassmorphism, matching coupon modal) --- */
#tourflow-login-modal {
    z-index: 100001 !important;
}
#tourflow-login-modal .tourflow-glass-card {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
#tourflow-login-modal .tourflow-login-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
}
#tourflow-login-modal .tourflow-login-success {
    color: #50e3c2;
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
}

/* --- Payment Header & Modal Styles --- */

#tourflow-coupon-modal {
    /* Overlay styles handled inline, ensuring z-index */
    z-index: 99999 !important;
}

/* --- 5. Payment Methods Styling --- */
.tourflow-checkout-embed #payment {
    background: transparent !important;
    border-radius: 0 !important;
}

.tourflow-checkout-embed ul.payment_methods {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0 !important;
}

.tourflow-checkout-embed ul.payment_methods li {
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 6px;
    list-style: none;
}

.tourflow-checkout-embed ul.payment_methods li input {
    margin-right: 10px;
}

.tourflow-checkout-embed ul.payment_methods li label {
    font-size: 1rem !important; /* Larger for payment options */
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Fix for massive MercadoPago (or other gateway) icons */
.tourflow-checkout-embed ul.payment_methods li label img {
    max-height: 24px !important;
    width: auto !important;
    margin-left: 10px;
    vertical-align: middle;
}

/* Payment Box Description */
.tourflow-checkout-embed .payment_box {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: #ddd !important;
    font-size: 0.85rem;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   6. TWO-COLUMN CHECKOUT LAYOUT (Billing Left + Payment Right)
   Fixed: targets #order_review (direct grid child) not #payment
   ═══════════════════════════════════════════════════════════════ */
.tourflow-checkout-embed .woocommerce-checkout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 30px !important;
    align-items: start !important;
}

/* Customer Details → left column */
.tourflow-checkout-embed #customer_details {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

/* Order Review (contains #payment) → right column */
.tourflow-checkout-embed #order_review {
    grid-column: 2 !important;
    grid-row: 1 / -1 !important;
    margin-top: 0 !important;
    width: 100% !important;
}

/* Hide redundant WC order review heading (TourFlow has its own header) */
.tourflow-checkout-embed #order_review_heading {
    display: none !important;
}

/* Hide the WC order totals table (the sticky header shows this) */
.tourflow-checkout-embed #order_review > table.shop_table {
    display: none !important;
}

/* Additional Info spans full width below */
.tourflow-checkout-embed .woocommerce-additional-fields {
    grid-column: 1 / -1 !important;
}

/* --- Cascade Neutralization (override tourflow-frontend.css line 977) --- */
.tourflow-checkout-embed .col2-set {
    grid-column: unset !important;
    grid-row: unset !important;
}
.tourflow-checkout-embed #customer_details .col-1,
.tourflow-checkout-embed #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
}

/* Mobile: stack to single column */
@media (max-width: 768px) {
    .tourflow-checkout-embed .woocommerce-checkout {
        grid-template-columns: 1fr !important;
    }
    .tourflow-checkout-embed #customer_details,
    .tourflow-checkout-embed #order_review {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   7. SECTION HEADER STYLING (Matching Step 3 Review Title)
   ═══════════════════════════════════════════════════════════════ */
.tourflow-checkout-embed h3,
.tourflow-checkout-embed .woocommerce-billing-fields h3,
.tourflow-checkout-embed .woocommerce-additional-fields h3,
#tourflow-step-4-content h3,
.tourflow-summary-page .tourflow-payment-method-heading {
    color: var(--ast-global-color-0, #14abc4) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid var(--ast-global-color-0, #14abc4) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Custom Payment Method header style in wizard Step 4 */
.tourflow-summary-page .tourflow-payment-method-heading {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.tourflow-summary-page .tourflow-payment-method-heading .tourflow-payment-method-title {
    color: var(--ast-global-color-0, #14abc4) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
}

.tourflow-summary-page .tourflow-payment-method-heading .tourflow-coupon-trigger {
    font-size: 0.8rem !important;
    color: #50e3c2 !important;
    text-decoration: none !important;
    border-bottom: 1px dashed #50e3c2 !important;
    font-weight: normal !important;
    text-transform: none !important;
}

/* Inline coupon form in the Step-3 totals card (replaces the old modal trigger).
   Input + Apply button on one row, mirroring the cart coupon look. */
.tourflow-review-coupon-form-row {
    display: block;
}

.tourflow-review-coupon-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    align-items: stretch;
}

.tourflow-review-coupon-form .tourflow-coupon-input {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    text-transform: uppercase;
}

.tourflow-review-coupon-form .tourflow-coupon-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: none;
}

.tourflow-review-coupon-form .tourflow-coupon-submit {
    flex: 0 0 auto;
    background-color: var(--ast-global-color-0, #14abc4);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tourflow-review-coupon-form .tourflow-coupon-submit:hover {
    background-color: var(--ast-global-color-1, #108a9e);
}

.tourflow-review-coupon-form .tourflow-coupon-submit.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Align checkout headers on desktop */
@media (min-width: 922px) {
    .tourflow-summary-page .tourflow-checkout-embed #customer_details,
    .tourflow-summary-page .tourflow-checkout-embed #customer_details .col-1,
    .tourflow-summary-page .tourflow-checkout-embed #customer_details .col-2,
    .tourflow-summary-page .tourflow-checkout-embed .woocommerce-billing-fields {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    .tourflow-summary-page .tourflow-checkout-embed #order_review {
        margin-top: 35px !important;
        padding-top: 0 !important;
    }
    .tourflow-summary-page .tourflow-checkout-embed .woocommerce-billing-fields h3,
    .tourflow-summary-page .tourflow-payment-method-heading {
        margin-top: 0 !important;
        margin-bottom: 16px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   8. HIDE "CREATE ACCOUNT" CHECKBOX (forced via WC admin settings)
      [Removed: Now allowing account creation fields to show if enabled in WC]
   ═══════════════════════════════════════════════════════════════ */


/* ==========================================================================
   Boutique My Account Page (Glassmorphism)
   ========================================================================== */

/* 1. Base Glass Panes for Login/Register & Dashboard.
   max-width: 1000px matches the wizard container and gives room for the
   25% nav + 75% content split on logged-in sub-pages. */
.tourflow-boutique-account .woocommerce {
    background: rgba(20, 20, 20, 0.7) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-width: 1000px;
    margin: 40px auto;
    /* GPU composite — Safari flicker prevention */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* 2. Login / Register Grid Spacing */
.tourflow-boutique-account .u-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.tourflow-boutique-account .u-column1, 
.tourflow-boutique-account .u-column2 {
    flex: 1;
    min-width: 300px;
    padding: 0 !important;
}

/* Vertical divider for desktop */
@media (min-width: 769px) {
    .tourflow-boutique-account .u-column1 {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 40px !important;
    }
}

/* 3. Typography & Labels (Aviation Style) */
.tourflow-boutique-account h2 {
    color: #ffffff !important; /* White headings across all account pages */
    font-size: 2rem !important;
    margin-top: 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tourflow-boutique-account label {
    color: rgba(255, 255, 255, 0.9) !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    display: block;
}

/* 4. Aviation Inputs (Matches Checkout/Step 3) */
.tourflow-boutique-account input[type="text"],
.tourflow-boutique-account input[type="password"],
.tourflow-boutique-account input[type="email"],
.tourflow-boutique-account input[type="tel"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    border-bottom: 1px solid rgba(80, 227, 194, 0.5) !important; /* Teal bottom border */
    border-radius: 4px 4px 0 0 !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    padding: 12px 15px !important;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.tourflow-boutique-account input[type="text"]:focus,
.tourflow-boutique-account input[type="password"]:focus,
.tourflow-boutique-account input[type="email"]:focus,
.tourflow-boutique-account input[type="tel"]:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom-color: #50e3c2 !important; /* Bright Teal focus */
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.1) !important;
    outline: none !important;
}

/* Additional text / help text */
.tourflow-boutique-account .woocommerce-privacy-policy-text p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 5. Buttons (Teal Accent) */
.tourflow-boutique-account .woocommerce-form-login__submit,
.tourflow-boutique-account .woocommerce-form-register__submit {
    background-color: var(--ast-global-color-0) !important; /* Teal */
    color: #000 !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.tourflow-boutique-account .woocommerce-form-login__submit:hover,
.tourflow-boutique-account .woocommerce-form-register__submit:hover {
    background-color: #fff !important;
    box-shadow: 0 0 15px rgba(80, 227, 194, 0.6) !important;
}

/* 6. Remember Me Checkbox */
.tourflow-boutique-account .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 0;
    text-transform: none !important;
}
.tourflow-boutique-account input[type="checkbox"] {
    margin: 0 !important;
    cursor: pointer;
}

/* Lost Password Link */
.tourflow-boutique-account .woocommerce-LostPassword {
    margin-top: 15px;
    text-align: center;
}
.tourflow-boutique-account .woocommerce-LostPassword a {
    color: var(--ast-global-color-0);
    text-decoration: underline;
    font-size: 0.85rem;
}

/* 7. Logged-in Dashboard Layout — float sidebar */
.tourflow-boutique-account .woocommerce-MyAccount-navigation {
    width: 22%;
    float: left;
    padding-right: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    margin-right: 0;
}
.tourflow-boutique-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tourflow-boutique-account .woocommerce-MyAccount-navigation li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tourflow-boutique-account .woocommerce-MyAccount-navigation li a {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    padding: 12px 15px;
    text-decoration: none !important;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.tourflow-boutique-account .woocommerce-MyAccount-navigation li.is-active a,
.tourflow-boutique-account .woocommerce-MyAccount-navigation li a:hover {
    color: var(--ast-global-color-0, #14abc4) !important;
    background: rgba(255, 255, 255, 0.04);
    border-left: 2px solid var(--ast-global-color-0, #14abc4);
    padding-left: 13px;
}
.tourflow-boutique-account .woocommerce-MyAccount-content {
    width: 78%;
    float: left;
    padding-left: 30px;
    box-sizing: border-box;
}

/* Clearfix for dashboard */
.tourflow-boutique-account .woocommerce::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .tourflow-boutique-account .woocommerce {
        padding: 20px !important;
        margin: 20px auto !important;
    }
    .tourflow-boutique-account .woocommerce-MyAccount-navigation,
    .tourflow-boutique-account .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-right: none !important;
        border-left: none !important;
    }
    .tourflow-boutique-account .woocommerce-MyAccount-navigation {
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-bottom: 10px;
    }
    .tourflow-boutique-account .woocommerce-MyAccount-content {
        padding: 0 !important;
    }
}

/* ==========================================================================
   Mobile Overrides (Placed at end to prevent cascade overriding)
   ========================================================================== */
@media (max-width: 768px) {
    /* Option 2: True Stacked Card Layout */
    .tourflow-extra-grid-item {
        display: flex !important;
        flex-direction: column !important;
        background: rgba(255,255,255,0.03) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        gap: 10px !important;
        padding: 15px !important;
        margin-bottom: 15px !important;
        min-width: 0 !important;
    }
    
    .tf-extra-col-name, 
    .tf-extra-col-details {
        width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
    
    .tourflow-extra-grid-item.is-child-of-group .tf-extra-col-name {
        padding-left: 0 !important; 
    }
    .tourflow-extra-grid-item.is-child-of-group .tf-extra-col-name::before {
        display: none !important;
    }
    
    /* Footer Action Row within the Card */
    .tf-extra-col-action {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 10px !important;
        padding-top: 10px !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.1) !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
    
    .tf-extra-price {
        white-space: nowrap !important; /* Force price to stay intact */
        word-break: normal !important;
        order: 1 !important;
        margin-right: 0 !important;
    }
    
    .tf-manifest-check-container {
        order: 2 !important;
    }
    
    /* Step 3 Consistency with Step 2 Cards */
    .tourflow-review-card,
    .tourflow-review-terms,
    #tourflow_factura_checkout_wrapper {
        background: rgba(255,255,255,0.03) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 15px !important;
        margin-bottom: 15px !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ==========================================================================
   Mobile-Responsive Modal Overrides (RC14 Modal Centering Fix)
   ========================================================================== */

#tourflow-details-modal,
#tourflow-pax-confirm-modal,
#tourflow-coupon-modal,
.tourflow-terms-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: none; /* Managed by JS */
    justify-content: center !important;
    align-items: center !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

#tourflow-details-modal .tourflow-details-content,
#tourflow-pax-confirm-modal .tourflow-details-content,
#tourflow-replace-tour-modal .tourflow-details-content,
#tourflow-coupon-modal .tourflow-glass-card,
.tourflow-terms-modal-content {
    margin: auto !important;
    position: relative !important;
    /* Lift the content box ABOVE the overlay's ::after dark tint (z-index:1),
       otherwise the 0.6 black tint paints over the modal and makes it look
       smoky/opaque. */
    z-index: 2 !important;
    max-width: 500px !important;
    width: 100% !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: #1a1a1a !important;
    background: linear-gradient(145deg, rgba(30,30,30,0.98), rgba(20,20,20,0.99)) !important;
    color: #fff !important;
    box-sizing: border-box !important;
}

.tourflow-terms-modal-content {
    max-width: 600px !important;
}

@media (max-width: 768px) {
    #tourflow-details-modal,
    #tourflow-pax-confirm-modal,
    #tourflow-coupon-modal,
    .tourflow-terms-modal-overlay {
        align-items: flex-start !important;
        padding: 40px 15px !important;
    }

    #tourflow-details-modal .tourflow-details-content,
    #tourflow-pax-confirm-modal .tourflow-details-content,
    #tourflow-coupon-modal .tourflow-glass-card,
    .tourflow-terms-modal-content {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding: 20px !important;
        width: 100% !important;
    }
}


/* ── Step-4 Edit in My Account link (inline-right of "Datos del Cliente") ──
   The link is rendered (via woocommerce_after_checkout_billing_form) as the last
   child of .woocommerce-billing-fields, but visually we lift it onto the section
   heading row, right-aligned, mirroring the payment-method heading pattern above.
   Anchoring to the heading (not the field flow) keeps it clear of the email field
   and the "Información adicional" block below. */

.tourflow-checkout-embed .woocommerce-billing-fields {
    position: relative;
}

.tourflow-billing-edit-account-link {
    /* Positioning context is .woocommerce-billing-fields (set position:relative above),
       whose TOP is the "Datos del Cliente" heading. Anchor to the TOP so the link sits
       on the heading row — using `bottom` pinned it to the bottom of the tall fields
       container (down by the email field), which is what looked "completely off".
       top:8px baseline-aligns it within the heading's ~1.3rem line. */
    position: absolute;
    right: 0;
    top: 24px;
    margin: 0;
    line-height: 1;
}

.tourflow-billing-edit-account-link a {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: normal;
    text-transform: none;
    color: #50e3c2;
    text-decoration: none;
    border-bottom: 1px dashed #50e3c2;
}

.tourflow-billing-edit-account-link a:hover {
    color: #fff;
    border-bottom-color: #fff;
    text-decoration: none;
}

/* The link is small now, so it stays on the heading row at all widths (lined up with
   "Datos del Cliente"). If a very narrow screen ever crowds the heading, allow the
   heading text to sit beside it without collision. */
@media (max-width: 480px) {
    .tourflow-billing-edit-account-link a {
        font-size: 0.75rem;
    }
}

/* Missing phone notice */
.tourflow-phone-missing-notice {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 14px 16px;
    color: #ff9a9a;
    font-size: 0.88rem;
    line-height: 1.5;
}

.tourflow-phone-missing-notice p {
    margin: 0 0 10px;
}

.tourflow-btn-inline {
    display: inline-block;
    font-size: 0.82rem;
    color: #50e3c2;
    border-bottom: 1px dashed #50e3c2;
    text-decoration: none;
}

.tourflow-btn-inline:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* Suppress Place Order button when phone is missing */
#tourflow-step-4-content.tf-phone-missing #place_order,
#tourflow-step-4-content.tf-phone-missing .wc-block-components-checkout-place-order-button {
    pointer-events: none;
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================================================
   xoo-el Login / Register Popup — Glassmorphism Override
   MOVED to assets/css/tourflow-login-modal.css so it can load site-wide.
   The easy-login-woocommerce popup (.xoo-el-modal / .xoo-el-inmodal) is injected
   in wp_footer on EVERY page and can be triggered from the header anywhere, but
   this shortcodes stylesheet only loads on booking-summary/account pages — which
   left the popup unstyled (flat white) everywhere else. Do not re-add the xoo-el
   rules here; edit tourflow-login-modal.css instead.
   ========================================================================== */

