/*
 * TravelBuddy247 — Design Polish v2
 * Responsive, mature, professional UI improvements
 * Stack: plain HTML + CSS + vanilla JS + Flask static
 *
 * This file is appended after styles.css. Override specificity
 * is achieved by rule ordering, not by blanket !important.
 * ----------------------------------------------------------------
 * TABLE OF CONTENTS
 *  1. Design tokens (overrides / additions)
 *  2. Base & typography
 *  3. Layout system utilities
 *  4. Button system
 *  5. Form system
 *  6. Navbar — desktop + mobile hamburger
 *  7. Landing page responsive
 *  8. Auth + Signup responsive
 *  9. Onboarding responsive
 * 10. Discovery page responsive
 * 11. Connections + Chat responsive
 * 12. AirportBuddy — form + My Trips + match cards
 * 13. Hotels responsive
 * 14. Profile responsive
 * 15. Modals responsive
 * 16. Global utilities & a11y
 */

/* ══════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ══════════════════════════════════════════════════════════════════ */
:root {
  /* Spacing scale */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;
  --sp-2xl:64px;

  /* Border radius scale */
  --r-sm:  8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl:28px;

  /* Typography scale */
  --t-xs:  11px;
  --t-sm:  13px;
  --t-md:  15px;
  --t-lg:  18px;
  --t-xl:  24px;
  --t-2xl: 32px;
  --t-3xl: 42px;

  /* Shadows */
  --sh-xs: 0 1px 3px rgba(20,19,38,.06);
  --sh-sm: 0 2px 8px rgba(20,19,38,.07);
  --sh-md: 0 4px 20px rgba(20,19,38,.09);
  --sh-lg: 0 8px 40px rgba(20,19,38,.12);

  /* Transition */
  --ease: .18s ease;

  /* Mobile nav height */
  --mobile-bar-h: 60px;

  /* Page padding */
  --page-pad-x: 20px;
  --page-pad-x-lg: 28px;
}

/* ══════════════════════════════════════════════════════════════════
   2. BASE & TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════ */

/* Prevent horizontal overflow globally */
html, body { overflow-x: hidden; }

/* Better base text rendering */
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-feature-settings: "kern" 1;
}

/* Consistent heading sizes */
h1 { font-size: clamp(24px, 5vw, 52px); }
h2 { font-size: clamp(20px, 3.5vw, 36px); }
h3 { font-size: clamp(16px, 2.5vw, 22px); }
h4 { font-size: clamp(15px, 2vw, 18px); }

/* Legible body text */
p { line-height: 1.65; }

/* Long text in tags / badges — never let them clip */
[class*="-badge"], [class*="-pill"], [class*="-chip"], [class*="-tag"] {
  max-width: 100%;
  word-break: break-word;
}

/* ══════════════════════════════════════════════════════════════════
   3. LAYOUT SYSTEM UTILITIES
   ══════════════════════════════════════════════════════════════════ */

/* Standard page container */
.tb-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--page-pad-x-lg);
}

/* Inner page wrap (for app pages) */
.tb-page-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px var(--page-pad-x-lg) 100px;
}

@media (max-width: 640px) {
  .tb-container { padding: 0 var(--page-pad-x); }
  .tb-page-wrap { padding: 20px var(--page-pad-x) 80px; }
}

/* ══════════════════════════════════════════════════════════════════
   4. BUTTON SYSTEM
   ══════════════════════════════════════════════════════════════════ */

/* Primary */
.btn-primary,
.ab-btn-primary,
.ln-btn-primary,
.at-btn-create,
.at-btn-signin,
.ob-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--ease);
  background: linear-gradient(135deg, #7b5ce1, #9b7af0);
  color: #fff;
  box-shadow: 0 2px 12px rgba(123,92,225,.22);
  white-space: nowrap;
  min-height: 44px; /* touch-friendly */
  text-decoration: none;
  line-height: 1;
}
.btn-primary:hover,
.ab-btn-primary:hover,
.at-btn-create:hover,
.at-btn-signin:hover,
.ob-continue-btn:hover {
  background: linear-gradient(135deg, #6f4fd6, #8b6ae0);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(123,92,225,.34);
}
.btn-primary:active,
.ab-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(123,92,225,.2);
}

/* Secondary / outline */
.btn-secondary,
.ab-btn-ghost,
.ob-save-draft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease);
  min-height: 44px;
  white-space: nowrap;
}
.btn-secondary:hover,
.ab-btn-ghost:hover,
.ob-save-draft:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-soft);
}

/* Danger */
.btn-danger,
.ab-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid #fecaca;
  border-radius: var(--r-md);
  background: #fff;
  color: #ef4444;
  cursor: pointer;
  transition: all var(--ease);
  min-height: 44px;
}
.btn-danger:hover,
.ab-btn-danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* Full-width button variant */
.btn-full { width: 100%; }

/* ══════════════════════════════════════════════════════════════════
   5. FORM SYSTEM
   ══════════════════════════════════════════════════════════════════ */

/* Unified input/select/textarea */
.ab-field input,
.ab-field select,
.ab-field textarea,
.at-field input,
.at-field select,
.ob-field input,
.ob-field select,
.ob-field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-surface);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}
.ab-field input:focus,
.ab-field select:focus,
.ab-field textarea:focus,
.at-field input:focus,
.at-field select:focus,
.ob-field input:focus,
.ob-field select:focus,
.ob-field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123,92,225,.10);
}

/* Form labels */
.ab-field label,
.at-field label,
.ob-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Error text */
.ab-err,
.at-error,
.su-error,
.stp-error {
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
  display: block;
  margin-top: 3px;
  line-height: 1.4;
}

/* Safety checkbox alignment */
.ab-safety-checkbox {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
}
.ab-safety-checkbox input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
  accent-color: var(--purple);
  cursor: pointer;
}

/* AirportBuddy safety note */
.ab-safety-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  margin-top: 4px;
}
.ab-safety-note span { font-size: 16px; flex-shrink: 0; line-height: 1.4; }
.ab-safety-note p {
  font-size: 13px;
  color: #92400e;
  line-height: 1.55;
  margin: 0;
}

/* Form actions row */
.ab-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Optional label text */
.ab-optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   6. NAVBAR — DESKTOP + MOBILE HAMBURGER
   ══════════════════════════════════════════════════════════════════ */

/* Glassmorphism (already applied via styles.css enhancement block,
   here we just reinforce the height and layout stability) */
.navbar {
  height: var(--nav-h);
  min-height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}

/* Brand */
.nav-brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 1;
  overflow: hidden;
}

/* Desktop nav buttons */
.nav-btn {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
  transition: background var(--ease);
  position: relative;
  z-index: 201;
}
.nav-hamburger:hover { background: var(--bg-section); }
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all .25s ease;
  transform-origin: center;
}

/* Hamburger → X animation when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 8px 32px rgba(20,19,38,.12);
  z-index: 199;
  padding: 12px 16px 20px;
  flex-direction: column;
  gap: 4px;
  animation: mobileNavSlide .22s ease;
}
@keyframes mobileNavSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile-overlay.open { display: flex; }
.nav-mobile-overlay .nav-btn {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--r-md);
  min-height: 48px;
}
.nav-mobile-overlay .nav-btn.active {
  background: linear-gradient(135deg, #5b3fd6, #7b5ce1);
  color: #fff;
}
.nav-mobile-overlay .logout-btn {
  color: #ef4444;
  margin-top: 8px;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  margin-left: 0;
}
.nav-mobile-overlay .logout-btn:hover { background: #fef2f2; }

/* Backdrop for mobile nav */
.nav-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.2);
  z-index: 198;
  backdrop-filter: blur(2px);
}
.nav-mobile-backdrop.open { display: block; }

/* ── Responsive Navbar breakpoints ── */
@media (max-width: 860px) {
  .nav-btn { padding: 7px 10px; font-size: 12px; }
}

@media (max-width: 680px) {
  /* Show hamburger, hide desktop link row */
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .nav-btn { font-size: 13px; padding: 7px 10px; }
  .nav-brand { font-size: 15px; }
}
@media (max-width: 420px) {
  .nav-brand { font-size: 14px; }
}

/* Override styles.css 420px hide-hack so overlay always shows all nav items */
.nav-mobile-overlay .nav-btn[data-page="parent"],
.nav-mobile-overlay .nav-btn[data-page="hotels"],
.nav-mobile-overlay .logout-btn {
  display: flex !important;
}

/* ══════════════════════════════════════════════════════════════════
   7. LANDING PAGE — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Ensure container doesn't overflow on tiny screens */
.ln-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--page-pad-x-lg);
  width: 100%;
  box-sizing: border-box;
}

/* Hero section — better mobile feel */
.ln-hero { overflow: hidden; }

.ln-hero-inner {
  align-items: center;
  min-height: 0;
}

/* Stats row — no overflow */
.ln-stats {
  flex-wrap: wrap;
  gap: 16px;
  row-gap: 12px;
}

/* Testimonial grid — single col mobile */
@media (max-width: 640px) {
  .ln-container { padding: 0 16px; }
  .ln-section { padding: 52px 0; }

  .ln-h1 { font-size: 38px !important; letter-spacing: -1.5px !important; line-height: 1.08 !important; }
  .ln-hero-sub { font-size: 15px; margin-bottom: 28px; }
  .ln-hero-btns { flex-direction: column; gap: 10px; }
  .ln-btn-primary.ln-btn-lg,
  .ln-btn-outline { width: 100%; text-align: center; justify-content: center; }

  .ln-stats { gap: 12px; }
  .ln-stat strong { font-size: 18px; }
  .ln-stat span { font-size: 9px; }

  /* Problem cards */
  .ln-prob-grid { grid-template-columns: 1fr; gap: 14px; }
  .ln-prob-card { padding: 20px 18px; }

  /* Solution */
  .ln-sol-item { flex-direction: column; gap: 12px; }
  .ln-sol-img { width: 100%; height: 160px; }

  /* Steps */
  .ln-steps-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ln-step-card { padding: 16px 14px; }

  /* Pricing */
  .ln-pricing-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Stories */
  .ln-testi-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Hotels */
  .ln-hotels-grid { grid-template-columns: 1fr; gap: 14px; }

  /* CTA */
  .ln-cta-h2 { font-size: 28px; letter-spacing: -1px; }
  .ln-cta-sub { font-size: 14px; }
  .ln-cta-wrap button { width: 100%; }

  /* Footer */
  .ln-footer-top { flex-direction: column; gap: 32px; }
  .ln-footer-cols { flex-direction: column; gap: 24px; }
  .ln-footer-bottom-inner { flex-direction: column; gap: 6px; text-align: center; }

  /* Trust bar */
  .ln-trust-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .ln-trust-logos { flex-wrap: wrap; gap: 12px; }
  .ln-trust-logos span { font-size: 12px; }
}

@media (max-width: 360px) {
  .ln-h1 { font-size: 32px !important; letter-spacing: -1px !important; }
  .ln-steps-grid { grid-template-columns: 1fr; }
}

/* ── Landing nav mobile ── */
@media (max-width: 640px) {
  .ln-nav-links { display: none; }
  .ln-nav-actions { gap: 6px; }
  .ln-btn-text { display: none; }
  .ln-logo small { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   8. AUTH + SIGNUP — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Auth layout already collapses on mobile (at-right hides),
   but padding needs fixing */
.at-left {
  padding: 40px 40px;
  min-height: 100vh;
  justify-content: center;
}

@media (max-width: 640px) {
  .at-left { padding: 32px 20px; }
  .at-h1 { font-size: 28px; letter-spacing: -0.8px; }
  .at-social-row { gap: 8px; }
}

/* Signup card */
.su-card {
  padding: 36px 32px;
  width: 100%;
}
.su-topbar { padding: 0 20px; }

@media (max-width: 640px) {
  .su-card { padding: 28px 20px; border-radius: var(--r-xl); }
  .su-topbar { padding: 0 16px; }
  .su-body { padding: 24px 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   9. ONBOARDING — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Prevent page-setup from creating its own horizontal scroll context */
#page-setup { overflow-x: hidden; }

.ob-container { padding: 32px 32px; }
.ob-h1 { font-size: clamp(22px, 4vw, 34px); letter-spacing: -0.8px; }
.ob-intro-desc { font-size: 14px; max-width: 540px; }

/* Bottom bar — prevent content overlap on mobile */
.ob-bottom-bar { padding: 0 4px; }
.ob-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
}

@media (max-width: 640px) {
  .ob-container { padding: 20px 16px 24px; }
  .ob-topbar-inner { padding: 0 16px; }
  .ob-bottom-inner { padding: 0 16px; }
  .ob-grid { grid-template-columns: 1fr; gap: 28px; }
  .ob-left-col { flex-direction: row; align-items: flex-start; gap: 16px; }
  .ob-photo-wrap { width: 100px; height: 130px; flex-shrink: 0; }
  /* width:100% on ob-bio-tip causes iOS Safari to treat it as a min-size equal
     to the full container, overflowing the viewport when photo is also in the row.
     width:auto overrides that; min-width:0 lets flex shrink past content size. */
  .ob-bio-tip { flex: 1; width: auto; min-width: 0; }
  /* Hide the photo hint in row mode — it ends up as a flex item between photo and
     bio-tip card, squeezing both. It is shown again when the layout goes column. */
  .ob-photo-hint { display: none; }
  .ob-name-row { grid-template-columns: 1fr; }
  .ob-type-row { grid-template-columns: 1fr; }
  .ob-music-btns { grid-template-columns: 1fr 1fr; }
  .ob-bottom-actions { flex-direction: row; gap: 8px; }
  .ob-continue-btn { flex: 1; }
  .ob-h1 { font-size: 22px; }
}

/* Column layout for all iPhones (375–430 px) and narrow Androids.
   Previously this was 380px which missed iPhone 12/13/14 (390px). */
@media (max-width: 480px) {
  .ob-left-col { flex-direction: column; align-items: center; gap: 14px; }
  .ob-photo-wrap { width: 140px; height: 180px; flex-shrink: unset; }
  /* Restore hint below the photo now that we are in column mode */
  .ob-photo-hint { display: block; }
  .ob-music-btns { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   10. DISCOVERY PAGE — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* 3-column layout fine-tuning */
.disc-layout {
  padding: 20px 20px 100px;
  max-width: 1320px;
  margin: 0 auto;
  gap: 16px;
}

/* Header row */
.disc-header { gap: 12px; align-items: center; }
.disc-greeting { font-size: 26px; font-weight: 900; letter-spacing: -0.8px; }
.disc-subtitle { font-size: 13px; line-height: 1.5; margin-top: 2px; }

/* Swipe counter badge */
.disc-swipe-counter {
  flex-shrink: 0;
  font-size: 12px;
  white-space: nowrap;
}

/* Center row height — make it fill better */
.disc-center-row {
  min-height: 420px;
  height: auto;
  flex: 1;
}

/* Detail panel scroll */
.disc-detail-col { overflow-y: auto; }
.dp-scroll { padding: 14px 16px 20px; }

/* Action buttons row */
.disc-actions {
  justify-content: center;
  gap: 20px;
  padding: 8px 0 4px;
}

/* Filter sidebar label sizing */
.df-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

/* Mobile filter toggle button */
.disc-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}
.disc-mobile-filter-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

@media (max-width: 1024px) {
  .disc-layout { grid-template-columns: 220px 1fr 0; }
  .disc-sidebar { display: none; }
}

@media (max-width: 820px) {
  .disc-layout { grid-template-columns: 200px 1fr; }
  .disc-sidebar { display: none; }
}

@media (max-width: 680px) {
  .disc-layout {
    grid-template-columns: 1fr;
    padding: 14px 14px 90px;
  }
  #filterPanel { display: none !important; }
  .disc-mobile-filter-btn { display: inline-flex; }
  .disc-header { margin-bottom: 8px; }
  .disc-center-row {
    flex-direction: column;
    height: auto;
    min-height: 340px;
    border-radius: var(--r-lg);
    overflow: hidden;
  }
  .disc-card-col {
    width: 100%;
    min-height: 340px;
    position: relative;
  }
  .disc-detail-col {
    max-height: 240px;
    border-left: none;
    border-top: 1px solid var(--border-soft);
    overflow-y: auto;
  }
}

@media (max-width: 440px) {
  .disc-layout { padding: 12px 12px 80px; }
  .disc-greeting { font-size: 22px; }
  .disc-actions { gap: 16px; }
  .da-btn { width: 50px; height: 50px; font-size: 19px; }
  .da-match { width: 60px; height: 60px; font-size: 22px; }
}

/* ══════════════════════════════════════════════════════════════════
   11. CONNECTIONS + CHAT — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* List column — more compact on small screens */
.mx-list-col {
  min-width: 0;
  border-right: 1px solid var(--border-soft);
}

.mx-list-header { padding: 18px 16px 12px; }
.mx-list-title { font-size: 20px; }

.match-item {
  padding: 12px 16px;
  gap: 10px;
}
.match-name { font-size: 14px; }
.match-preview { font-size: 12px; }
.match-avatar { width: 44px; height: 44px; font-size: 15px; }

/* Chat header */
.mx-chat-hdr { padding: 12px 16px; }
.mx-chat-name-text { font-size: 15px; }

/* Messages area */
.mx-messages { padding: 16px; gap: 10px; }
.msg-bubble { font-size: 14px; max-width: 72%; }

/* Input row */
.mx-input-row {
  padding: 10px 14px 12px;
  gap: 8px;
}
.mx-input-field {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 22px;
}
.mx-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  font-size: 16px;
}

@media (max-width: 768px) {
  .mx-layout { grid-template-columns: 1fr; height: calc(100vh - var(--nav-h)); }
  .mx-list-col { height: 100%; }
  .mx-chat-col { height: 100%; position: fixed; inset: 0; z-index: 50; top: var(--nav-h); }
  .mx-layout:not(.chat-open) .mx-chat-col { display: none; }
  .mx-layout.chat-open .mx-list-col { display: none; }
  .mx-layout.chat-open .mx-chat-col { display: flex; }
  .mx-back-btn { display: flex !important; }
}

@media (max-width: 440px) {
  .mx-list-header { padding: 14px 14px 10px; }
  .mx-list-title { font-size: 18px; }
  .msg-bubble { max-width: 82%; font-size: 14px; }
  .mx-messages { padding: 12px; }
}

/* ══════════════════════════════════════════════════════════════════
   12. AIRPORTBUDDY — COMPREHENSIVE POLISH
   ══════════════════════════════════════════════════════════════════ */

/* Page wrap */
.ab-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  box-sizing: border-box;
}

/* Hero section */
.ab-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.ab-hero-left { max-width: 580px; flex: 1; }
.ab-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.ab-headline {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.ab-subline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 500px;
}

/* Tab group */
.ab-hero-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
  padding-top: 0;
}
.ab-htab {
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all var(--ease);
  white-space: nowrap;
  min-height: 40px;
}
.ab-htab:hover:not(.active) { border-color: var(--purple); color: var(--purple); }
.ab-htab.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

/* Two-column main grid */
.ab-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* Form card */
.ab-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 28px 28px;
  box-shadow: var(--sh-sm);
  width: 100%;
  box-sizing: border-box;
}
.ab-card-hdr { margin-bottom: 22px; }
.ab-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.3;
}
.ab-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Form rows — responsive */
.ab-form-row {
  display: flex;
  gap: 14px;
}
.ab-form-row .ab-field { flex: 1; min-width: 0; }

/* Field spacing */
.ab-field { margin-bottom: 16px; }
.ab-field:last-of-type { margin-bottom: 0; }

/* Chips */
.ab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ab-chip {
  padding: 7px 13px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}
.ab-chip:hover { border-color: var(--purple); color: var(--purple); }
.ab-chip.selected {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
}

/* Help grid chips */
.ab-help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ab-help-chip {
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease);
  text-align: left;
  line-height: 1.4;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}
.ab-help-chip:hover { border-color: var(--purple); color: var(--purple); }
.ab-help-chip.selected {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
}

/* My Trips tabs */
.ab-mytabs {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 18px;
}
.ab-mytab {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease);
  border-right: 1.5px solid var(--border-soft);
  min-height: 42px;
}
.ab-mytab:last-child { border-right: none; }
.ab-mytab.active { background: var(--purple); color: #fff; }
.ab-mytab:hover:not(.active) { background: var(--bg-section); }

/* Trip cards */
.ab-trip-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--sh-xs);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ab-trip-main { flex: 1; min-width: 0; }
.ab-trip-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.ab-trip-route {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.3;
  word-break: break-word;
}
.ab-trip-arrow { color: var(--text-muted); font-weight: 400; flex-shrink: 0; }
.ab-trip-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.ab-trip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

/* Helper match cards */
.ab-hcard {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  box-shadow: var(--sh-xs);
}
.ab-hcard-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ab-hcard-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-border), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 16px;
}
.ab-hcard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ab-hcard-info { flex: 1; min-width: 0; }
.ab-hcard-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.ab-hcard-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.ab-hcard-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ab-hcard-quote {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.55;
  margin: 0;
  border-left: 3px solid var(--purple-border);
  padding-left: 10px;
}
.ab-hcard-reasons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ab-hcard-reason {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
}
.ab-hcard-reason::before { content: '•'; color: var(--purple); flex-shrink: 0; margin-top: 1px; }
.ab-hcard-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* How-it-works card */
.ab-how-card {
  background: var(--bg-section);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ab-how-step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: flex-start;
}
.ab-how-step:last-child { border-bottom: none; padding-bottom: 0; }
.ab-how-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ab-how-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.ab-how-text { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* Best match card */
.ab-best-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--purple-border);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: 0 4px 20px rgba(123,92,225,.08);
}
.ab-best-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ab-best-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ab-best-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.ab-best-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.ab-best-info { flex: 1; min-width: 0; }
.ab-best-rating {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ab-best-langs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ab-lchip {
  padding: 4px 10px;
  background: var(--purple-soft);
  color: var(--purple);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--purple-border);
}
.ab-best-quote {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 14px;
  border-left: 3px solid var(--purple-border);
  padding-left: 10px;
}
.ab-connect-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7b5ce1, #9b7af0);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ease);
  min-height: 44px;
}
.ab-connect-btn:hover {
  background: linear-gradient(135deg, #6f4fd6, #8b6ae0);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(123,92,225,.32);
}

/* Sidebar label */
.ab-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Trust grid */
.ab-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ab-trust-item {
  background: var(--bg-section);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}
.ab-trust-icon { font-size: 22px; }
.ab-trust-title { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.ab-trust-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* Status badges — consistent */
.ab-status-draft,
.ab-status-matched,
.ab-status-sent,
.ab-status-confirmed,
.ab-status-pending,
.ab-status-received,
.ab-status-helping {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.2px;
}

/* Responsive: AirportBuddy */
@media (max-width: 900px) {
  .ab-main { grid-template-columns: 1fr; }
  .ab-sidebar-col { order: -1; }
  .ab-trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ab-page-wrap { padding: 20px 16px 80px; }
  .ab-hero { flex-direction: column; gap: 16px; }
  .ab-hero-tabs { width: 100%; gap: 6px; }
  .ab-htab { flex: 1; text-align: center; padding: 9px 10px; font-size: 12px; }
  .ab-headline { font-size: 20px; }
  .ab-subline { font-size: 13px; }
  .ab-card { padding: 20px 16px; border-radius: var(--r-lg); }
  .ab-card-title { font-size: 16px; }
  .ab-form-row { flex-direction: column; gap: 0; }
  .ab-field-sm { max-width: 100% !important; flex: unset !important; }
  .ab-help-grid { grid-template-columns: 1fr; }
  .ab-form-actions { flex-direction: column-reverse; gap: 8px; }
  .ab-form-actions .ab-btn-primary,
  .ab-form-actions .ab-btn-ghost { width: 100%; justify-content: center; text-align: center; }
  .ab-trust-grid { grid-template-columns: 1fr; }
  .ab-trip-card { flex-direction: column; gap: 12px; }
  .ab-trip-side { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; justify-content: flex-start; }
  .ab-hcard-actions { flex-direction: column; }
  .ab-hcard-actions > * { width: 100%; justify-content: center; text-align: center; }
  .ab-mytabs { border-radius: var(--r-sm); }
  .ab-mytab { font-size: 12px; padding: 9px 6px; }
}

@media (max-width: 420px) {
  .ab-hero-tabs { flex-direction: column; }
  .ab-htab { width: 100%; }
  .ab-chips { gap: 5px; }
  .ab-chip { font-size: 11px; padding: 6px 10px; }
}

/* ══════════════════════════════════════════════════════════════════
   13. HOTELS — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

.hotels-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  box-sizing: border-box;
}

.hotel-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.hotel-card {
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.hotel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}

@media (max-width: 640px) {
  .hotels-shell { padding: 16px 14px 80px; }
  .hotel-grid { grid-template-columns: 1fr; gap: 12px; }
  .hotels-hero h2 { font-size: 22px; }
  .hotel-card-header { height: 200px; }
}

/* ══════════════════════════════════════════════════════════════════
   14. PROFILE — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

.pvd-page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 100px;
}

.pvd-cover { height: 220px; }
.pvd-body { display: grid; grid-template-columns: 180px 1fr; }
.pvd-left { padding: 0 12px 28px; }
.pvd-right { padding: 18px 18px 28px; border-left: 1px solid var(--border-soft); }

/* Stats */
.pvd-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pvd-stat {
  border-radius: var(--r-md);
  padding: 10px 8px;
}
.pvd-stat-val { font-size: 20px; }

/* Chips */
.pvd-chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .pvd-page-wrap { padding: 0 0 80px; }
  .pvd-cover { height: 160px; }
  .pvd-body { grid-template-columns: 1fr; }
  .pvd-left {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .pvd-photo-wrap { margin: -52px auto 12px; }
  .pvd-left-name, .pvd-left-meta { text-align: center; }
  .pvd-edit-btn { max-width: 220px; }
  .pvd-right { border-left: none; border-top: 1px solid var(--border-soft); padding: 14px; }
  .pvd-stats { grid-template-columns: repeat(2, 1fr); }
  .pvd-chips { gap: 6px; }
}

/* ══════════════════════════════════════════════════════════════════
   15. MODALS — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Match modal */
.mm-modal, .match-toast {
  padding: 16px;
}
.toast-inner {
  max-width: 340px;
  width: 100%;
  padding: 32px 24px;
}

/* Match reason modal */
.mrm-box {
  max-width: 380px;
  width: 100%;
  padding: 24px 20px;
  border-radius: var(--r-2xl);
}
.mrm-pct { font-size: 52px; }

/* Full profile drawer */
.fpm-panel {
  width: 100%;
  max-width: 440px;
}
@media (max-width: 480px) {
  .fpm-panel { max-width: 100vw; }
  .mrm-box { margin: 0 4px; }
  .toast-inner { padding: 24px 18px; }
}

/* AirportBuddy request modal */
.ab-modal-box {
  max-width: 480px;
  width: 100%;
  border-radius: var(--r-2xl);
}
@media (max-width: 520px) {
  .ab-modal-box { border-radius: var(--r-lg); margin: 0 8px; }
  .ab-modal-actions { flex-direction: column-reverse; gap: 8px; }
  .ab-modal-actions > * { width: 100%; justify-content: center; }
}

/* Filter panel modal */
.filter-box {
  max-width: 500px;
  width: 100%;
  border-radius: var(--r-2xl);
}
@media (max-width: 540px) {
  .filter-box { border-radius: var(--r-xl); padding: 20px 16px 20px; }
  .filter-mode-cards { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .fmode-card { padding: 11px 6px 10px; }
}

/* Parent Choice Modal */
.pm-box {
  border-radius: var(--r-2xl);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
}
.pm-choices { gap: 10px; }
.pm-choice {
  border-radius: var(--r-lg);
  padding: 16px;
  min-height: 72px;
}
@media (max-width: 440px) {
  .pm-choices { flex-direction: column; }
  .pm-choice { width: 100%; }
  .pm-box { padding: 22px 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   16. GLOBAL UTILITIES & ACCESSIBILITY
   ══════════════════════════════════════════════════════════════════ */

/* Consistent focus ring */
*:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Clickable areas never too small */
button, [role="button"] { min-height: 36px; }

/* Readable placeholder text */
::placeholder { color: var(--text-muted); opacity: 1; font-size: 14px; }

/* No horizontal scroll on any page */
.page, #page-discover, #page-swipe, #page-matches, #page-parent, #page-hotels, #page-profile-view {
  overflow-x: hidden;
}

/* Safe area insets (iPhone notch) */
@supports (padding: env(safe-area-inset-bottom)) {
  .ob-bottom-bar,
  .mx-input-row,
  .disc-actions {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

/* Consistent section eyebrow label */
.ln-section-label,
.ab-eyebrow,
.ob-section-eyebrow,
.ds-card-title,
.df-lbl,
.pvd-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Empty states — always centered + readable */
.disc-empty,
.mx-chat-empty,
.ab-empty-state {
  text-align: center;
  padding: 48px 24px;
}
.disc-empty-title,
.ab-empty-text {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.disc-empty-sub,
.ab-empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* Toasts */
.app-toast {
  bottom: 20px;
  max-width: 320px;
  width: calc(100% - 32px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--r-lg);
}

/* Overflow prevention for tags */
.card-tags, .ob-tag-picker, .df-tags, .ab-chips {
  overflow: hidden;
}

/* Print: hide non-essential chrome */
@media print {
  .navbar, .nav-mobile-overlay, .nav-mobile-backdrop { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   17. PHASE 5.25 — VISUAL MATURITY POLISH
   ══════════════════════════════════════════════════════════════════ */

/* ── Navbar glassmorphism upgrade ── */
.navbar {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(230,225,243,.7);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 24px rgba(20,19,38,.05);
}

/* Active nav button uses the dark chip style */
.nav-btn.active {
  background: var(--text-primary);
  color: #fff;
  font-weight: 600;
}

/* ── Landing hero stats — replace raw "DEMO DATA PREVIEW" chip ── */
.ln-stat strong { letter-spacing: -0.3px; }
.ln-stat span   { letter-spacing: 0.8px; }

/* ── Landing trust-bar: tighter on tablet ── */
@media (max-width: 900px) {
  .ln-trust-inner { gap: 24px; }
  .ln-trust-logos { gap: 20px; }
}

/* ── Landing: hero badge pill refinement ── */
.ln-badge-pill {
  font-size: 11px;
  letter-spacing: 0.3px;
  padding: 6px 16px;
}

/* ── Auth form: better input focus ring ── */
.at-field input:focus,
.at-field select:focus {
  box-shadow: 0 0 0 3px rgba(123,92,225,.12);
}

/* ── Signup type cards: sharper hover ── */
.su-type-card:hover { box-shadow: 0 6px 24px rgba(123,92,225,.12); }

/* ── Discover card: deeper shadow on front card ── */
.profile-card.front {
  box-shadow: 0 16px 56px rgba(20,19,38,.16), 0 4px 16px rgba(20,19,38,.08);
}
.profile-card.behind {
  box-shadow: 0 6px 24px rgba(20,19,38,.08);
}

/* Discover card body text — slightly more readable */
.card-bio  { color: var(--text-secondary); line-height: 1.55; }
.card-langs, .card-looking { color: var(--text-muted); }

/* Action buttons — bigger touch target on mobile */
@media (max-width: 480px) {
  .sa-skip { width: 56px; height: 56px; }
  .sa-like { width: 64px; height: 64px; }
}

/* ── Connections / Matches list — cleaner items ── */
.match-item {
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--sh-xs);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.match-item:hover {
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}
.match-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.match-avatar img { border-radius: 12px; }
.match-name { font-size: 15px; }
.match-preview { font-size: 13px; }

/* ── Mode tabs: rounder ── */
.mode-tab { border-radius: var(--r-md); font-size: 13px; }

/* ── Chat: message bubbles ── */
.msg-bubble.mine {
  background: linear-gradient(135deg, #7b5ce1, #9b7af0);
  border-bottom-right-radius: 4px;
}
.msg-bubble.theirs {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(20,19,38,.05);
}

/* Chat input row: pill shape */
.chat-input-row input {
  border-radius: 24px;
  border-color: var(--border-soft);
  background: var(--bg-section);
  font-size: 14px;
  padding: 11px 18px;
}
.chat-input-row input:focus { background: #fff; }

/* ── AirportBuddy form section label ── */
.ab-form-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

/* ── AirportBuddy safety field checkbox variant ── */
.ab-safety-field .ab-safety-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
}
.ab-safety-field .ab-safety-checkbox {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
  accent-color: var(--purple);
}
/* Override the design-polish.css rule that makes .ab-safety-checkbox a flex row
   (it targets label.ab-safety-checkbox, not input.ab-safety-checkbox) */
input.ab-safety-checkbox {
  display: inline !important;
}

/* Match tip in AirportBuddy form */
.ab-match-tip {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-section);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin: 4px 0 16px;
  line-height: 1.55;
  border-left: 3px solid var(--purple-border);
}

/* ── Status badge colour system ── */
.ab-status-draft    { background: #f1f5f9; color: #64748b; }
.ab-status-pending  { background: #fff7ed; color: #9a3412; }
.ab-status-sent     { background: #eff6ff; color: #1d4ed8; }
.ab-status-received { background: #f0fdf4; color: #166534; }
.ab-status-matched  { background: #f0fdf4; color: #166534; }
.ab-status-confirmed{ background: #ecfdf5; color: #065f46; }
.ab-status-helping  { background: var(--purple-soft); color: var(--purple); }

/* ── Hotel demo badge ── */
.ln-demo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.52);
  color: rgba(255,255,255,.92);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.ln-hotel-img-wrap { position: relative; }

/* ── Profile view: better right column spacing ── */
.pvd-section-title {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Connection request items in Connections tab ── */
.conn-req-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--sh-xs);
}
.conn-req-item:hover { box-shadow: var(--sh-sm); }
.conn-req-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple-soft), var(--purple-border));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--purple);
  flex-shrink: 0; overflow: hidden;
}
.conn-req-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.conn-req-body { flex: 1; min-width: 0; }
.conn-req-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.conn-req-meta { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.conn-req-msg {
  font-size: 13px; color: var(--text-secondary);
  background: var(--bg-section);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0 10px;
  line-height: 1.55;
}
.conn-req-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.conn-req-accept {
  padding: 8px 18px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ease);
  min-height: 36px;
}
.conn-req-accept:hover { background: var(--purple-hover); transform: translateY(-1px); }
.conn-req-decline {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ease);
  min-height: 36px;
}
.conn-req-decline:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* ── Empty states — richer visuals ── */
.conn-empty-state,
.disc-empty-state-enhanced {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  gap: 12px;
}
.conn-empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-section);
  border: 1.5px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 4px;
}
.conn-empty-title {
  font-size: 18px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.conn-empty-sub {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.65;
  max-width: 280px;
}

/* ── Profile drawer: cleaner inner scroll ── */
.fpm-panel {
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  box-shadow: -8px 0 48px rgba(20,19,38,.14);
}

/* ── Hotels: ensure demo badge positioned ── */
.ln-hotel-card .ln-hotel-img-wrap { position: relative; }

/* ── Button loading state ── */
.btn-loading {
  opacity: .65;
  pointer-events: none;
  cursor: wait;
}

/* ── Scrollbar: thin and subtle on Chrome ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Focus improvements ── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* ── Mobile: AirportBuddy tab row wraps ── */
@media (max-width: 540px) {
  .ab-mytabs { flex-wrap: wrap; }
  .ab-mytab  { min-width: 50%; border-right: none; border-bottom: 1.5px solid var(--border-soft); }
  .ab-mytab:last-child { border-bottom: none; }
}

/* ── Mobile: Connections list header ── */
@media (max-width: 480px) {
  .mx-list-title { font-size: 17px; }
  .mode-tab { font-size: 12px; padding: 8px 14px; }
}

/* ── Mobile: Chat input area safe area ── */
@media (max-width: 680px) {
  .chat-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Verified / beta badges: consistent ── */
.ln-verified-badge {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
}

/* ── AirportBuddy hero eyebrow uppercase label ── */
.ab-eyebrow { color: var(--purple); }

/* ── Landing stories section: prevent orphaned text ── */
.ln-testi-card p {
  orphans: 3;
  widows: 3;
}

/* ── Pricing: button text during beta ── */
#landingPricingPro,
#landingPricingMax {
  position: relative;
}

/* ── Consistent section heading refinement ── */
.ln-h2, .ln-h2-wide, .ln-h2-sm {
  line-height: 1.18;
}

/* ── Tagline / hero sub: max-width on large screens ── */
.ln-hero-sub { max-width: 420px; }

/* ── Onboarding completion bar ── */
.ob-completion-text { font-size: 13px; color: var(--text-muted); }
.ob-pct { color: var(--purple); font-weight: 800; font-size: 15px; }

/* ── Chat empty state ── */
.mx-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: var(--text-muted);
  padding: 40px 24px;
  text-align: center;
}
.mx-chat-empty-icon { font-size: 36px; margin-bottom: 4px; }
.mx-chat-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.mx-chat-empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
}

/* ── Edit Profile: Change photo button — mobile-safe tap target ── */
.pem-change-photo-btn {
  min-height: 44px;
  padding: 10px 20px;
  transition: opacity 0.15s ease;
}
.pem-change-photo-btn:active { opacity: 0.7; }

/* ── Connections online indicator ── */
.mx-online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}
.mx-online-lbl { font-size: 11px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════
   CITY PICKER — searchable dropdown (onboarding + edit profile)
   ══════════════════════════════════════════════════════════════════ */

.city-picker-wrap {
  position: relative;
  width: 100%;
}

.city-picker-input {
  width: 100%;
  box-sizing: border-box;
}

.city-picker-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(99, 91, 255, 0.18);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 9999;
  padding: 4px 0;
  /* smooth appear */
  animation: dropFadeIn 0.12s ease;
}

@keyframes dropFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.city-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--ease);
  border-radius: 0;
}

.city-drop-item:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.city-drop-item:last-child  { border-radius: 0 0 var(--r-md) var(--r-md); }

.city-drop-item:hover,
.city-drop-item.active {
  background: rgba(99, 91, 255, 0.07);
}

.city-drop-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #14132c);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-drop-country {
  font-size: 12px;
  color: var(--text-muted, #888);
  flex-shrink: 0;
}

.city-drop-empty {
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #888);
}

.city-picker-hint {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-top: 6px;
  line-height: 1.4;
}

/* Scrollbar — slim & on-brand */
.city-picker-drop::-webkit-scrollbar        { width: 4px; }
.city-picker-drop::-webkit-scrollbar-track  { background: transparent; }
.city-picker-drop::-webkit-scrollbar-thumb  { background: rgba(99,91,255,.25); border-radius: 4px; }

/* Mobile: larger tap targets */
@media (max-width: 600px) {
  .city-drop-item { padding: 13px 14px; }
  .city-drop-name { font-size: 15px; }
}

/* ══════════════════════════════════════════════════════════════════
   AIRPORTBUDDY PHASE 5.29 — Post Request form UI polish
   ══════════════════════════════════════════════════════════════════ */

/* "Who needs help?" — card-style chips, larger tap targets */
.ab-rf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-rf-chips .ab-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border-soft);
  background: #fff;
  color: var(--text-secondary);
  transition: border-color var(--ease), background var(--ease), color var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ab-rf-chips .ab-chip:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(99, 91, 255, 0.04);
}

.ab-rf-chips .ab-chip.active {
  border-color: var(--purple);
  background: rgba(99, 91, 255, 0.09);
  color: var(--purple);
  font-weight: 600;
}

/* Safety field — always full-width flex row */
.ab-safety-field {
  margin-top: 4px;
  margin-bottom: 0;
}

.ab-safety-field .ab-safety-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.ab-safety-field .ab-safety-label span {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ab-safety-field .ab-safety-checkbox {
  flex-shrink: 0;
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--purple);
  cursor: pointer;
  /* Reset any flex-display override from the generic rule */
  display: inline-block !important;
}

/* How it works — compact steps */
.ab-how-card {
  padding: 0;
}

.ab-how-step {
  padding: 11px 0;
}

/* Form actions — ensure enough top breathing room */
.ab-form-actions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

/* Mobile adjustments for request-for chips */
@media (max-width: 600px) {
  .ab-rf-chips .ab-chip {
    min-height: 44px;
    font-size: 13px;
    padding: 8px 13px;
  }

  .ab-safety-field .ab-safety-label span {
    font-size: 14px;
  }
}

/* ══ HOTELS PHASE 5.30 ══ */

/* Interest / notify card */
.hotel-interest-card {
  background: #111021;
  color: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.hotel-ic-body strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.hotel-ic-body p {
  color: rgba(255,255,255,.72);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.55;
}
.hotel-ic-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hotel-ic-yes {
  flex: 0 0 auto;
  padding: 10px 22px;
  font-size: 14px;
}
.hotel-ic-dismiss {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
  border-radius: var(--r-md, 10px);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.hotel-ic-dismiss:hover { border-color: rgba(255,255,255,.6); color: #fff; }
.hotel-ic-status {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #a3e635;
}
.hotel-ic-status.hidden { display: none; }

/* Preview badge on card image */
.hotel-preview-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.92);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* Coming-soon tag in card meta row */
.hotel-coming-soon-tag {
  color: var(--primary, #6c63ff);
  font-weight: 700;
}

/* Small price note under card price */
.hotel-card-price-note {
  font-size: 10px;
  color: var(--muted, #888);
  margin-top: 2px;
  font-weight: 400;
}

/* Page subtitle */
.hotel-page-sub {
  color: var(--text-secondary, #666);
  font-size: 14px;
  margin: 4px 0 18px;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .hotel-interest-card { padding: 16px 16px; }
  .hotel-ic-body strong { font-size: 15px; }
  .hotel-ic-actions { flex-direction: column; }
  .hotel-ic-yes, .hotel-ic-dismiss { width: 100%; text-align: center; }
}

/* ══ GOOGLE AUTH PHASE 6 ══ */
.at-google-row { margin-bottom: 4px; }
.at-google-btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

/* ══ AIRPORTBUDDY MICRO-UX — Phase 6.3 ══ */

/* Required star */
.ab-req-star {
  color: #c0392b;
  font-weight: 700;
  font-size: 12px;
  margin-left: 1px;
  line-height: 1;
}

/* Label + info button on one row */
.ab-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  flex-wrap: nowrap;
}
.ab-label-row label {
  display: inline;
  margin-bottom: 0;
  flex-shrink: 1;
  min-width: 0;
}

/* Info icon button */
.ab-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.ab-info-btn:hover,
.ab-info-btn:focus-visible {
  color: var(--primary);
  outline: 2px solid var(--primary-border);
  outline-offset: 1px;
}
.ab-info-btn[aria-expanded="true"] {
  color: var(--primary);
}

/* Tooltip — inline, fades in below label row. No absolute positioning = no off-screen risk. */
.ab-tooltip {
  display: block;
  visibility: hidden;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 11px;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 100%;
  word-break: break-word;
  transition: opacity 0.14s ease, max-height 0.18s ease, padding 0.14s ease, margin 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  pointer-events: none;
}
.ab-tooltip.open {
  visibility: visible;
  opacity: 1;
  max-height: 130px;
  padding: 8px 11px;
  margin-bottom: 6px;
  border-color: var(--border-soft);
  box-shadow: 0 3px 12px rgba(80,60,140,0.09);
  pointer-events: auto;
}

/* Section label with star/info icon */
.ab-form-section-label.ab-label-row {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

@media (max-width: 480px) {
  .ab-tooltip { font-size: 12px; padding: 7px 10px; }
  .ab-info-btn { min-width: 22px; min-height: 22px; font-size: 14px; }
}

/* ── Discover header right group ─────────────────────────────────── */
.disc-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile filter toggle — hidden on desktop, shown on mobile */
.disc-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--primary, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.disc-mobile-filter-btn:hover { background: var(--primary-dark, #6d28d9); }
.disc-mobile-filter-btn.active { background: var(--primary-dark, #6d28d9); }

@media (max-width: 768px) {
  .disc-mobile-filter-btn { display: inline-flex; }

  #filterPanel.mobile-open {
    display: flex !important;
    position: static !important;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 8px;
  }
}

/* ── Discover sidebar: beta info card (replaces premium card) ─────── */
.ds-beta-info {
  border-color: rgba(124, 58, 237, 0.18) !important;
  background: linear-gradient(135deg, #faf7ff, #f3eeff) !important;
}
.ds-beta-body {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  line-height: 1.55;
  margin: 0;
}

/* Generic modal overlay (used by offerHelpModal) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface, #fff);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

