/* Breathtaking Lagoon v5.10.1 — mobile-first booking search hardening */
@media (max-width: 640px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .search-card,
  .affiliate-widget,
  .affiliate-widget--flights,
  .blfs-search,
  .home-hotel-search,
  .hotel-search-card,
  .flight-widget-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Homepage Flights / Hotels / Cars chooser */
  .search-card { border-radius: 20px !important; overflow: visible !important; }
  .search-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    border-radius: 20px 20px 0 0;
  }
  .search-tab {
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 11px 6px !important;
    gap: 5px !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: .82rem !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }
  .search-tab svg { width: 15px !important; height: 15px !important; flex: 0 0 auto; }
  .widget-body, .widget-pane { width: 100% !important; min-width: 0 !important; }

  /* Flight search — one comfortable mobile column */
  .blfs-search { padding: 18px 14px !important; border-radius: 0 0 18px 18px !important; }
  .blfs-heading { margin-bottom: 14px !important; }
  .blfs-heading strong { font-size: 1rem !important; }
  .blfs-heading span { line-height: 1.45 !important; }
  .blfs-trip-types {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
  }
  .blfs-route-grid,
  .blfs-details-grid,
  .blfs-traveler-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 10px !important;
  }
  .blfs-field,
  .blfs-input-wrap { width: 100% !important; min-width: 0 !important; }
  .blfs-input,
  .blfs-date,
  .blfs-select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    padding-left: 14px !important;
    padding-right: 38px !important;
    font-size: 16px !important; /* prevents iOS zoom and keeps typing readable */
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }
  .blfs-date, .blfs-select { padding-right: 12px !important; }
  .blfs-swap {
    width: 46px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: -1px auto 0 !important;
    transform: rotate(90deg) !important;
  }
  .blfs-results {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 44vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .blfs-option { min-height: 58px !important; padding: 10px 11px !important; }
  .blfs-submit {
    width: 100% !important;
    min-height: 56px !important;
    font-size: 1rem !important;
    touch-action: manipulation;
  }
  .blfs-help, .blfs-trust-note { font-size: .78rem !important; line-height: 1.5 !important; }

  /* Homepage hotel search — never squeeze dates or guests side by side */
  .home-hotel-search { padding: 18px 14px !important; }
  .home-hotel-brand { align-items: flex-start !important; }
  .home-hotel-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 11px !important;
    width: 100% !important;
  }
  .home-hotel-destination,
  .home-hotel-guests,
  .home-hotel-field,
  .home-hotel-submit {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .home-hotel-field input,
  .home-hotel-field select,
  .home-hotel-submit {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }
  .home-hotel-submit { margin-top: 2px !important; touch-action: manipulation; }

  /* Standalone Hotels page */
  .hotel-search-card { overflow: hidden !important; }
  .hotel-search-visual { min-height: 220px !important; padding: 24px 18px !important; }
  .hotel-search-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 11px !important;
    padding: 16px 14px !important;
    width: 100% !important;
  }
  .hotel-search-form label,
  .hotel-search-submit { width: 100% !important; min-width: 0 !important; }
  .hotel-search-form input,
  .hotel-search-form select,
  .hotel-search-submit {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }
  .hotel-search-submit { white-space: normal !important; touch-action: manipulation; }

  /* Standalone Flights page */
  .flight-widget-shell { padding: 18px 12px !important; border-radius: 20px !important; }
  .flight-widget-head { gap: 10px !important; margin-bottom: 16px !important; }
  .partner-brand-lockup { max-width: 100% !important; padding: 10px 11px !important; gap: 10px !important; }
  .partner-brand-logo { width: 88px !important; height: 38px !important; }
  .partner-brand-copy { padding-left: 10px !important; }

  /* Any embedded third-party search should not force horizontal scrolling. */
  .affiliate-widget iframe,
  .affiliate-widget > div { max-width: 100% !important; }

  /* Live Desk search + booking CTAs */
  .bl-live-search { grid-template-columns: 1fr !important; }
  .bl-live-search input,
  .bl-live-search button { width: 100% !important; min-width: 0 !important; min-height: 52px !important; font-size: 16px !important; }
  .bl-dest-actions { display: grid !important; grid-template-columns: 1fr !important; gap: 9px !important; }
  .bl-dest-actions a { width: 100% !important; min-height: 46px !important; display:flex !important; align-items:center !important; justify-content:center !important; }
}

@media (max-width: 390px) {
  .search-tab { font-size: .76rem !important; padding-inline: 4px !important; }
  .blfs-search, .home-hotel-search { padding-left: 12px !important; padding-right: 12px !important; }
  .flight-widget-shell { padding-left: 10px !important; padding-right: 10px !important; }
  .partner-brand-logo { width: 76px !important; }
}

/* Keep typed text visible in Night mode on iPhone/Safari. */
html[data-theme="night"] :where(.blfs-input,.blfs-date,.blfs-select,.home-hotel-field input,.home-hotel-field select,.hotel-search-form input,.hotel-search-form select,.bl-live-search input) {
  color: #f5fffc !important;
  -webkit-text-fill-color: #f5fffc !important;
  caret-color: #55f0cd !important;
}
html[data-theme="night"] :where(.blfs-input,.home-hotel-field input,.hotel-search-form input,.bl-live-search input)::placeholder {
  color: #9fbab3 !important;
  -webkit-text-fill-color: #9fbab3 !important;
  opacity: 1 !important;
}
