/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 *
 *= require base
 *= require layouts
 *= require input
 *= require button
 *= require alert
 *= require flash
 *= require sidebar_menu
 *= require chat
 *= require inbox
 *= require css-zero
 *= require imports
 *= require utilities_block
 *= require entity_form
 *= require flatpickr
 *= require schedule_card
 *= require nearby_rides
 *= require travel_cards
 *= require_self
 */


/* Hide web button when native bridge component is active */
[data-bridge-components~="button"] [data-controller~="button"] {
  display: none;
}

/* Ensure hidden bridge anchors don't affect layout */
[data-controller~="button"][hidden],
[data-controller~="share"][hidden],
[data-controller~="haptics"][hidden] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Hide web share buttons when native share is available */
[data-bridge-components~="share"] [data-controller~="share"] {
  display: none;
}

/* Hide web CTAs when native toolbar buttons are available */
[data-bridge-components~="button"] .ios-hide-when-native,
.is-native .ios-hide-when-native {
  display: none !important;
}

.trip-type-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .trip-type-choice-grid {
    grid-template-columns: 1fr;
  }
}

.trip-type-choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-height: 7rem;
  border: 1.5px solid var(--color-neutral-fog, #d8d2c8);
  border-radius: 12px;
  background: #fff;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

/* Shared, trip-member-only phone actions. */
.contact-methods {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--color-neutral-fog, #ded9d0);
  border-radius: 13px;
  background: #fff;
}

.contact-methods__number {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-neutral-ink, #151413);
  font-family: 'Nunito', system-ui, sans-serif;
  text-decoration: none;
}

.contact-methods__number-label {
  color: var(--color-neutral-stone, #8a8479);
  font: 700 10px/1 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.contact-methods__number strong { font-size: 14px; overflow-wrap: anywhere; }
.contact-methods__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.contact-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 39px;
  padding: 0 9px;
  border: 1px solid var(--color-neutral-fog, #ded9d0);
  border-radius: 10px;
  background: var(--color-neutral-linen, #f7f3ec);
  color: var(--color-neutral-ink, #151413);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.contact-method svg { width: 15px; height: 15px; flex: 0 0 auto; }
.contact-method--whatsapp { border-color: #bfe9ce; background: #effaf3; color: #16783c; }
.contact-methods--compact { margin-top: 8px; padding: 9px; gap: 7px; }
.contact-methods--compact .contact-methods__number strong { font-size: 13px; }
.contact-methods--compact .contact-method { min-height: 34px; }

@media (max-width: 380px) {
  .contact-method span { display: none; }
  .contact-method svg { width: 17px; height: 17px; }
}

.trip-type-choice__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.trip-type-choice__radio {
  width: 1rem;
  height: 1rem;
  margin-top: 0.22rem;
  border: 1.5px solid var(--color-neutral-mist, #bdb7ad);
  border-radius: 999px;
  flex: 0 0 auto;
}

.trip-type-choice__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.trip-type-choice__label {
  color: var(--color-neutral-ink, #151413);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.2;
}

.trip-type-choice__description {
  color: var(--color-neutral-slate, #5f5a52);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
}

.trip-type-choice:has(.trip-type-choice__input:checked) {
  border-color: var(--color-brand-primary, #4A6FA5);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.08);
}

.trip-type-choice:has(.trip-type-choice__input:checked) .trip-type-choice__radio {
  border: 5px solid var(--color-brand-primary, #4A6FA5);
}

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

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: .4s;
}

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

.switch input:checked+.slider {
  background-color: #4A6FA5;
}

.switch input:checked+.slider:before {
  transform: translateX(20px);
}

/* Theme Variables - Trips.do Design System */
:root {
  /* Brand — "arrow breaking horizon ring" mark, Aug 2026 rebrand */
  --color-brand-primary: #4A6FA5;
  --color-brand-primary-dark: #3A5A87;
  --color-brand-primary-light: #EAF0F8;
  --color-brand-accent: #4A6FA5;
  --color-brand-accent-light: #EAF0F8;
  --color-brand-gold: #4A6FA5;
  --color-brand-gold-light: #FAF2E0;

  /* Neutrals */
  --color-neutral-ink: #2A2724;
  --color-neutral-graphite: #2A2724;
  --color-neutral-slate: #5A564F;
  --color-neutral-stone: #8A847A;
  --color-neutral-mist: #B8B3A9;
  --color-neutral-fog: #E3DED5;
  --color-neutral-linen: #F1ECE3;
  --color-neutral-cream: #FBF6EE;
  --color-neutral-paper: #FFFDF8;
  --color-neutral-white: #FFFFFF;

  /* Semantic */
  --color-semantic-positive: #2E7D5B;
  --color-semantic-positive-light: #E4F3EC;
  --color-semantic-warning: #C77B1A;
  --color-semantic-warning-light: #FAEFD9;
  --color-semantic-negative: #BE3A3A;
  --color-semantic-negative-light: #F6E2E2;
  --color-semantic-transit: #2563A8;
  --color-semantic-transit-light: #E3EEF9;
  --color-semantic-verified: #6B4FA0;
  --color-semantic-verified-dark: #533C7D;
  --color-semantic-verified-light: #F0EAF7;

  /* Legacy & Functional Aliases */
  --color-primary: var(--color-brand-primary);
  --color-accent: var(--color-brand-accent);
  --color-bg: var(--color-neutral-linen);
  --color-text-main: var(--color-neutral-ink);
  --color-text-muted: var(--color-neutral-slate);
  
  /* Shared palette aliases from Logo & Splash */
  --color-indigo: var(--color-brand-primary);
  --color-indigo-dark: var(--color-brand-primary-dark);
  --color-indigo-deep: #1A1B6B; /* From Logo & Splash */
  --color-coral: var(--color-brand-accent);
  --color-gold: var(--color-brand-gold);
  --color-cream: var(--color-neutral-cream);
  --color-linen: var(--color-neutral-linen);
  --color-paper: var(--color-neutral-paper);
  --color-ink: var(--color-neutral-ink);
  --color-slate: var(--color-neutral-slate);
  --color-stone: var(--color-neutral-stone);
  --color-fog: var(--color-neutral-fog);

  /* Spacing — 4px base (from Design System tokens) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius (from Design System tokens) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows (from Design System tokens) */
  --shadow-xs: 0 1px 2px rgba(21,20,19,0.04);
  --shadow-sm: 0 1px 3px rgba(21,20,19,0.06), 0 1px 2px rgba(21,20,19,0.04);
  --shadow-md: 0 4px 12px rgba(21,20,19,0.06), 0 2px 4px rgba(21,20,19,0.04);
  --shadow-lg: 0 12px 32px rgba(21,20,19,0.08), 0 4px 8px rgba(21,20,19,0.04);
  --shadow-xl: 0 24px 48px rgba(21,20,19,0.12), 0 8px 16px rgba(21,20,19,0.06);
  --shadow-focus: 0 0 0 3px rgba(74, 111, 165,0.18);

  /* Font families (from Design System tokens) — Aug 2026 rebrand: Quicksand
     for display/headings (was Fraunces), Nunito for body/UI (was Inter
     Tight). --font-serif keeps its name so the ~90 existing var() call
     sites don't need touching; it just no longer resolves to a serif. */
  --font-sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

/* Brand Theme Override — Trip Share (trip-share.com)
   Blue 500 palette aligns with the new Trip Share brand identity and app icons. */
html[data-brand="trip-share"],
body[data-brand="trip-share"] {
  --color-brand-primary: #3B82F6;
  --color-brand-primary-dark: #2563EB;
  --color-brand-primary-light: #EFF6FF;
  --color-brand-accent: #3B82F6;
  --color-brand-accent-light: #EFF6FF;
  --color-brand-gold: #3B82F6;
  --color-brand-gold-light: #EFF6FF;
  --color-primary: #3B82F6;
  --color-primary-dark: #2563EB;
  --color-indigo: #3B82F6;
  --color-indigo-dark: #2563EB;
  --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.22);

  /* Modern typography matching the Plus Jakarta Sans wordmark */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-serif: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;

  /* Fresh, airy neutrals — replacing heavy brown/muddy blacks and tan linen */
  --color-neutral-ink: #0F172A;       /* Slate 900 — crisp high-contrast readable text */
  --color-neutral-graphite: #1E293B;  /* Slate 800 */
  --color-neutral-slate: #64748B;     /* Slate 500 — clean neutral secondary text */
  --color-neutral-stone: #94A3B8;     /* Slate 400 */
  --color-neutral-mist: #CBD5E1;      /* Slate 300 */
  --color-neutral-fog: #E2E8F0;       /* Slate 200 — clean subtle borders */
  --color-neutral-linen: #F8FAFC;     /* Slate 50 — clean airy modern page bg */
  --color-neutral-cream: #F1F5F9;     /* Slate 100 */
  --color-neutral-paper: #FFFFFF;     /* Pure white cards */
  --color-neutral-white: #FFFFFF;
}

/* Trip Share UI refinements — soften heavy black blocks into branded elements */
[data-brand="trip-share"] .trips-topbar-new,
[data-brand="trip-share"] .mobile-topbar .trips-topbar-new {
  background: var(--color-brand-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.28) !important;
}

[data-brand="trip-share"] .trips-topbar-new:hover,
[data-brand="trip-share"] .trips-topbar-new:active,
[data-brand="trip-share"] .mobile-topbar .trips-topbar-new:hover,
[data-brand="trip-share"] .mobile-topbar .trips-topbar-new:active {
  background: var(--color-brand-primary-dark) !important;
  color: #ffffff !important;
}

[data-brand="trip-share"] .trips-container .trips-create-btn {
  background: var(--color-brand-primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25) !important;
}

[data-brand="trip-share"] .trips-container .trips-create-btn:hover {
  background: var(--color-brand-primary-dark) !important;
}

/* Trip Share segmented control: clean elevated pill with brand active state instead of pitch black */
[data-brand="trip-share"] .tabs-wrapper {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  padding: 4px !important;
  border-radius: 12px !important;
}

[data-brand="trip-share"] .tab-btn {
  color: #64748B !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
}

[data-brand="trip-share"] .tab-btn:hover {
  color: #0F172A !important;
}

[data-brand="trip-share"] .tab-btn.active {
  background: #FFFFFF !important;
  color: var(--color-brand-primary) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  font-weight: 750 !important;
}

[data-brand="trip-share"] .tab-btn.active .tab-count {
  color: var(--color-brand-primary) !important;
  opacity: 0.8 !important;
}

/* Trip Share badges */
[data-brand="trip-share"] .demo-badge {
  background: #E2E8F0 !important;
  color: #475569 !important;
  font-weight: 700 !important;
}

/* Trip Share navigation active underline */
[data-brand="trip-share"] .trip-tabs__tab.is-active::after {
  background: var(--color-brand-primary) !important;
}
/* Trip Share Travel Hub (.trv-page) overrides — replace purple/black with brand Blue 500 and fresh slate neutrals */
[data-brand="trip-share"] .trv-page {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #EFF6FF;
  --accent: #3B82F6;
  --accent-light: #EFF6FF;
  --share: #3B82F6;
  --share-dark: #2563EB;
  --share-light: #EFF6FF;
  --linen: #F8FAFC;
  --paper: #FFFFFF;
  --cream: #F1F5F9;
  --fog: #E2E8F0;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--linen) !important;
}

[data-brand="trip-share"] .trv-page .subnav button[aria-selected="true"],
[data-brand="trip-share"] .trv-page .subnav button.is-active {
  background: var(--color-brand-primary, #3B82F6) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3) !important;
}

[data-brand="trip-share"] .trv-page .subnav button[aria-selected="true"] .mc,
[data-brand="trip-share"] .trv-page .subnav button.is-active .mc {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-brand="trip-share"] .trv-page .post-fab {
  background: var(--color-brand-primary, #3B82F6) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.42) !important;
}

[data-brand="trip-share"] .trv-page .post-fab:hover {
  background: var(--color-brand-primary-dark, #2563EB) !important;
}

[data-brand="trip-share"] .trv-page .btn-primary {
  background: var(--color-brand-primary, #3B82F6) !important;
  color: #ffffff !important;
}

[data-brand="trip-share"] .trv-page .btn-primary:hover {
  background: var(--color-brand-primary-dark, #2563EB) !important;
}
/* Global Page Background */
.page {
  background: var(--color-bg);
  color: var(--color-text-main);
  /* Overrides gradient from css-zero */
  min-height: 100vh;
}

/* Offer flow — input focus ring (overrides css-zero blue) */
.offer-shell .input:focus,
.offer-shell .input:focus-visible,
.ride-form-shell .input:focus,
.ride-form-shell .input:focus-visible,
.stay-form-shell .input:focus,
.stay-form-shell .input:focus-visible {
  border-color: var(--color-brand-primary);
  box-shadow: var(--shadow-focus);
  outline: none;
}

/* Offer flow — compact contact buttons */
.compact-contact-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill, 99px);
  border: 1px solid var(--color-neutral-fog);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-neutral-slate);
  transition: background 0.15s, border-color 0.15s;
}
.compact-contact-btn:hover {
  background: var(--color-neutral-linen);
  border-color: var(--color-neutral-mist);
}

/* Trix/ActionText Content Styling */
.trix-content a {
  color: var(--color-brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.trix-content a:hover {
  color: var(--color-brand-primary-dark);
}

.trix-content {
  line-height: 1.6;
}
.nav-rate-sense-highlight {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(219, 39, 119, 0.25) !important;
  color: #db2777 !important;
  font-weight: 700 !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: 99px !important;
  border-bottom: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  box-shadow: 0 2px 10px rgba(219, 39, 119, 0.05);
}

.nav-rate-sense-highlight:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(219, 39, 119, 0.5) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.1);
}

.nav-rate-sense-highlight.active {
  background: #db2777 !important;
  color: white !important;
  border-color: #db2777 !important;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.25);
}

/* Chat Groups Styles */

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--color-bg);
  /* Updated to warm cream */
  /* FULL WIDTH: removed max-width for chat */
}

/* Global Mobile Topbar - Clean, minimal header */

/* Mobile Room Request Card Styles */
@media (max-width: 768px) {
  .mobile-optimized .request-type-badge {
    display: none !important;
  }

  .mobile-optimized .room-available-title {
    display: none !important;
  }

  .mobile-optimized .hotel-name {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
    font-weight: 900 !important;
  }

  .mobile-optimized .card-content>div:first-of-type {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
  }

  .mobile-optimized .details-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .mobile-optimized .pricing {
    padding: 0.8rem !important;
    margin-bottom: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .mobile-optimized .hotel-name {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
  }

  .mobile-optimized .badge-container {
    gap: 0.25rem !important;
  }

  .mobile-optimized .card-actions {
    gap: 0.3rem !important;
  }

  .mobile-optimized .card-actions a {
    padding: 0.15rem 0.3rem !important;
    font-size: 0.75rem !important;
  }
}

/* Hide web-only navigation elements when running in native iOS/Android shell */
html.is-native .header,
html.is-native .mobile-topbar,
html.is-native .header-wrapper,
html.is-native .desktop-nav-links,
html.is-native .back-button-container,
html.is-native .web-only-notifications {
  display: none !important;
}

/* Hide the inline notifications dropdown on narrow (mobile) web viewports —
   it crowds the trip name and the options overflow. Desktop web keeps it
   inline; mobile web users can still manage notifications from per-ride /
   per-stay / per-flight pages. Native app has its own top-bar bell. */
@media (max-width: 640px) {
  .web-only-notifications {
    display: none !important;
  }
}

html.is-native body {
  padding-top: 1rem !important; /* Safety margin for native navigation bar */
}

/* Fix Android WebView scrolling issues caused by overflow-x: hidden on body */
html.is-native, html.is-native body {
  /* WebView needs the document to scroll, not the body element */
}

/* Ensure no horizontal scrolling on mobile */
body {
  width: 100%;
}

.page {
  overflow-x: hidden;
}

.mobile-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.topbar-left,
.topbar-right {
  flex: 0 0 auto;
  min-width: 48px;
  /* A fixed 48px silently clipped anything wider — a text-labeled Chats
     link, two icons sharing a slot — since the flex item doesn't grow but
     its content still renders past the box. min-width keeps the usual
     single-icon slot from collapsing while letting a busier slot claim the
     room it actually needs. */
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-right {
  justify-content: flex-end;
}

.topbar-center {
  flex: 1;
  text-align: center;
  padding: 0 0.5rem;
  min-width: 0;
  /* Allow content to shrink */
  overflow: hidden;
  /* Ensure overflow is handled */
}

.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.topbar-btn:hover,
.topbar-btn:active {
  background: #e5e7eb;
  color: #1f2937;
}

/* Marks the topbar icon for the page you're already on (e.g. Search) as
   selected, matching how an active bottom tab reads, instead of an
   unrelated action (the generic "+") sitting in that slot. */
.topbar-btn--active {
  background: var(--color-brand-primary-light, #FAF2E0);
  border-color: transparent;
  color: var(--color-brand-primary, #4A6FA5);
}
.topbar-btn--active:hover,
.topbar-btn--active:active {
  background: var(--color-brand-primary-light, #FAF2E0);
  color: var(--color-brand-primary, #4A6FA5);
}

.topbar-btn--create {
  background: #4A6FA5;
  border-color: #4A6FA5;
  color: #ffffff;
}

.topbar-btn--create:hover,
.topbar-btn--create:active {
  background: #3A5A87;
  border-color: #3A5A87;
}

.topbar-btn--info {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

.topbar-btn--info:hover,
.topbar-btn--info:active {
  background: #2563eb;
  border-color: #2563eb;
}

/* Logo and title container */
.topbar-logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  gap: 0.5rem;
  min-width: 0;
  /* Allow flex items to shrink below content size */
}

.topbar-logo {
  height: 32px;
  width: auto;
  max-width: 200px;
  flex-shrink: 0;
  /* Prevent logo from shrinking */
}

.topbar-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  /* Allow text to shrink */
  flex: 1;
  /* Take remaining space */
  text-align: center;
}

/* Ensure logo and title work well together on very small screens */
@media (max-width: 320px) {
  .topbar-logo-title {
    gap: 0.25rem;
    /* Reduce gap on very small screens */
  }

  .topbar-logo {
    height: 24px;
    /* Smaller logo on very small screens */
  }

  .topbar-title {
    font-size: 0.875rem;
    /* Smaller text on very small screens */
  }
}

/* Context-aware page information */
.page-context {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  overflow: hidden;
  min-width: 0;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.page-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.page-filter {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4A6FA5;
  background: #FAF2E0;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #EAD39B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Responsive font sizing for smaller screens */
@media (max-width: 480px) {
  .topbar-title {
    font-size: 1rem;
    /* Remove fixed max-width to allow proper ellipsis */
  }

  .topbar-logo {
    height: 28px;
  }

  .page-title {
    font-size: 1.125rem;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }

  .page-filter {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 360px) {
  .topbar-title {
    font-size: 0.875rem;
    /* Remove fixed max-width to allow proper ellipsis */
  }

  .topbar-logo {
    height: 24px;
  }

  .page-title {
    font-size: 1rem;
  }

  .page-subtitle {
    font-size: 0.75rem;
  }

  .page-filter {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
  }
}

/* User menu dropdown */
.user-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1000;
  margin-top: 0.5rem;
}

.user-menu-dropdown.show {
  display: block;
}

.user-menu-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.user-menu-link:last-child {
  border-bottom: none;
}

.user-menu-link:hover {
  background: #f9fafb;
  color: #1f2937;
}

/* Quick create dropdown */
.quick-create-menu {
  position: relative;
}

.quick-create-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1000;
  margin-top: 0.5rem;
}

.quick-create-dropdown.show {
  display: block;
}

.quick-create-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.quick-create-link:last-child {
  border-bottom: none;
}

.quick-create-link:hover {
  background: #f9fafb;
  color: #1f2937;
}

.quick-create-icon {
  font-size: 1.25rem;
}

/* Welcome page CTAs */
.welcome-ctas {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.welcome-cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.welcome-cta--primary {
  background: #4A6FA5;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(74, 111, 165, 0.15);
}

.welcome-cta--primary:hover {
  background: #3A5A87;
  box-shadow: 0 4px 12px rgba(74, 111, 165, 0.25);
}

.welcome-cta--secondary {
  background: transparent;
  color: #4A6FA5;
  border: 2px solid #4A6FA5;
}

.welcome-cta--secondary:hover {
  background: #4A6FA5;
  color: #ffffff;
}

/* Responsive Utility Classes */
.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
}

/* Trip Section Nav — filled-pill tabs. The active tab is a solid ink pill,
   hover is a soft grey pill, inactive is plain muted text. Pills give the row
   a clear shared rhythm so it reads as one navigation, not loose words. */
.trip-section-nav__tab {
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-neutral-slate);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.trip-section-nav__tab:hover {
  background: var(--color-neutral-cream);
  color: var(--color-neutral-ink);
}

.trip-section-nav__tab--active,
.trip-section-nav__tab--active:hover {
  background: var(--color-neutral-ink);
  color: #fff;
  font-weight: 600;
}

/* Promoted "Hotel Deals" tab keeps its brand-primary identity when active. */
.trip-section-nav__tab--rate.trip-section-nav__tab--active,
.trip-section-nav__tab--rate.trip-section-nav__tab--active:hover {
  background: var(--color-brand-primary);
  color: #fff;
}

/* Badges sit inside the pill — invert them on the active (dark) pill so they
   stay legible instead of glowing light-on-dark. */
.trip-section-nav__tab--active .trip-section-nav__badge--primary {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.trip-section-nav__badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.trip-section-nav__badge--primary {
  background: var(--color-brand-primary-light);
  color: var(--color-brand-primary);
}

.trip-section-nav__badge--accent {
  background: var(--color-brand-accent);
  color: #fff;
}

/* Quiet secondary indicator on the Coordination tab — shows when group
   rates exist on the trip. Sits next to the main count, no background, just
   a small star + number. Lower visual weight than the count badge so it
   reads as a hint, not a claim. */
.trip-section-nav__rate-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-brand-primary);
}
.trip-section-nav__rate-indicator svg {
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .environment-banner {
    display: none !important;
  }

  .trip-section-nav__tab {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }
  .trip-section-nav {
    margin-bottom: 1rem;
  }
}

/* Mobile bottom tab bar markup, base styling, and its Stimulus controller
   live together: app/views/layouts/application.html.erb (inline <style> +
   show_bottom_tabs render), app/views/shared/_mobile_bottom_tabs.html.erb,
   and app/javascript/controllers/mobile_bottom_tabs_controller.js. A
   duplicate `.mobile-bottom-tabs`/`.tab-item` definition used to live here
   too — same class names, later in the cascade, so it silently won on ties
   and reintroduced bugs (notably a `--visual-viewport-bottom` positioning
   hack) that had already been fixed in the layout's copy. Don't re-add
   component styling here; it belongs with the partial. */
@media (max-width: 600px) {
  /* Add bottom padding to main content to account for tab bar */
  main#main {
    padding-bottom: 8.5rem;
  }

  /* Hide breadcrumbs on mobile since we have bottom tab navigation */
  .breadcrumbs {
    display: none !important;
  }

  /* The fixed bottom tabs are the primary mobile navigation. Hide the in-page
     trip section tabs so pages do not repeat Overview / Travel / Chat at the
     top and lose vertical space. */
  .trip-chrome--in-page {
    display: none !important;
  }
}

.chat-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

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

.chat-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.chat-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.chat-messages-content {
  max-width: 900px;
  margin: 0 auto;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  display: flex;
  flex-direction: column;
}

.message--system {
  text-align: center;
}

.message--user {
  align-items: flex-start;
}

.system-message {
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  display: inline-block;
}

.user-message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
}

.message-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  color: #6b7280;
  font-size: 0.9rem;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.message-author {
  font-weight: 600;
  color: #1f2937;
}

.message-time {
  color: #9ca3af;
  font-size: 0.8rem;
}

.message-text {
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-input {
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.chat-input-content {
  max-width: 900px;
  margin: 0 auto;
}

.message-form {
  width: 100%;
}

.input-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  resize: none;
  min-height: 2.5rem;
  max-height: 6rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.message-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.message-input::placeholder {
  color: #9ca3af;
}

/* Chat Groups Index Styles */

.chat-groups-bg {
  min-height: 100vh;
  background: var(--color-bg);
  padding: 2.5rem 0 2.5rem 0;
}

.chat-groups-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.chat-groups-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: 0.01em;
}

.chat-groups-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.chat-group-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(74, 111, 165, 0.07);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  min-height: 210px;
}

.chat-group-card:hover {
  box-shadow: 0 8px 32px rgba(74, 111, 165, 0.13);
  transform: translateY(-2px) scale(1.01);
}

.chat-group-header {
  margin-bottom: 1rem;
}

.chat-group-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.2rem;
  letter-spacing: 0.01em;
}

.chat-group-date {
  color: #D9AD52;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.chat-group-description {
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 0.98rem;
}

.chat-group-stats {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  font-size: 0.98rem;
  color: #475569;
}

.member-count,
.message-count {
  background: #f1f5f9;
  border-radius: 1rem;
  padding: 0.2em 0.9em;
  font-size: 0.98rem;
  font-weight: 600;
  color: #D9AD52;
}

.chat-group-actions {
  margin-top: auto;
  width: 100%;
}

.btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 700;
  border-radius: 2rem;
  padding: 0.7rem 0;
  background: #4A6FA5;
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(74, 111, 165, 0.10);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  margin-top: 0.2rem;
}

.btn:hover,
.btn:focus {
  background: #3A5A87;
  color: #fff;
  box-shadow: 0 4px 16px rgba(74, 111, 165, 0.13);
  transform: translateY(-1px) scale(1.01);
}

.btn[style*="background: #6b7280"] {
  background: #6b7280 !important;
  color: #fff !important;
}

.btn[style*="background: #6b7280"]:hover,
.btn[style*="background: #6b7280"]:focus {
  background: #4b5563 !important;
  color: #fff !important;
}

/* Empty States */

.empty-state,
.empty-chat {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-icon,
.empty-chat-icon {
  margin-bottom: 1.5rem;
}

.empty-state-title,
.empty-chat-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.empty-state-description,
.empty-chat-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Responsive Design */

@media (max-width: 768px) {
  .chat-header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .chat-groups-grid {
    grid-template-columns: 1fr;
  }

  .input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .message-input {
    min-height: 3rem;
  }
}

@media (max-width: 480px) {
  .chat-messages {
    padding: 0.75rem 1rem;
  }

  .chat-input {
    padding: 0.75rem 1rem;
  }

  .user-message {
    gap: 0.5rem;
  }

  .message-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .chat-groups-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .chat-group-card {
    padding: 1.2rem 1rem 1rem 1rem;
    min-height: 160px;
  }

  .chat-groups-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
  }
}

/* Mobile-first responsive design for the ride detail page */
.ride-detail-card.mobile-optimized {
  /* Base mobile styles */
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
}

/* Enhanced mobile interactions */
.ride-detail-card.mobile-optimized a:hover,
.ride-detail-card.mobile-optimized button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.ride-detail-card.mobile-optimized a:active,
.ride-detail-card.mobile-optimized button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions */
.ride-detail-card.mobile-optimized * {
  transition: all 0.2s ease;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  .ride-detail-card.mobile-optimized {
    margin: 0.75rem 0;
    padding: 1.25rem 1rem 1rem;
    border-radius: 12px;
  }

  .ride-detail-card.mobile-optimized h2 {
    font-size: 1.3rem;
  }

  .ride-detail-card.mobile-optimized h3 {
    font-size: 0.95rem;
  }

  /* Improve touch targets */
  .ride-detail-card.mobile-optimized .phone-contact-links a {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 480px) {
  .ride-detail-card.mobile-optimized {
    margin: 0.5rem 0;
    padding: 1rem 0.875rem 0.875rem;
    border-radius: 10px;
  }

  .ride-detail-card.mobile-optimized h2 {
    font-size: 1.2rem;
  }

  .ride-detail-card.mobile-optimized h3 {
    font-size: 0.9rem;
  }

  /* Ensure all touch targets are at least 44px */
  .ride-detail-card.mobile-optimized a,
  .ride-detail-card.mobile-optimized button {
    min-height: 44px;
  }

  /* Stack contact buttons vertically on very small screens */
  .phone-contact-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .phone-contact-links a {
    width: 100%;
    justify-content: center;
  }
}

/* Very small screen optimizations */
@media (max-width: 360px) {
  .ride-detail-card.mobile-optimized {
    padding: 0.875rem 0.75rem 0.75rem;
    margin: 0.375rem 0;
  }

  .ride-detail-card.mobile-optimized h2 {
    font-size: 1.1rem;
  }

  .ride-detail-card.mobile-optimized h3 {
    font-size: 0.85rem;
  }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .ride-detail-card.mobile-optimized {
    padding: 1rem 1.25rem;
  }

  .action-buttons-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .ride-detail-card.mobile-optimized {
    border-width: 0.5px;
  }
}



/* Hide back buttons on mobile since native header has back button */
@media (max-width: 768px) {

  .back-button-container,
  .mobile-hide-back-button {
    display: none !important;
  }
}

/* Flight Dashboard - Connection First Layout */

.flight-dashboard {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-title h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.2;
}

.dashboard-title p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.dashboard-actions {
  display: flex;
  gap: 1rem;
}

.btn-add-flight {
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.btn-add-flight:hover {
  opacity: 0.9;
}

/* My Flight Hero Card */
.my-flight-hero {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.hero-status-bar {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.booked {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.considered {
  background: #fef9c3;
  color: #a16207;
}

.hero-content {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
}

.airport-code {
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-text-main);
  line-height: 1;
}

.flight-time {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.5rem;
}

.flight-path-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.airline-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.path-line {
  height: 2px;
  background: #e2e8f0;
  width: 100%;
  position: relative;
  margin: 1rem 0;
}

.plane-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font-size: 1.5rem;
  color: var(--color-accent);
}

.path-dot {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.path-dot.start {
  left: 0;
}

.path-dot.end {
  right: 0;
}

.hero-actions {
  padding: 1rem 2rem;
  background: #fff;
  border-top: 1px solid #f1f5f9;
  text-align: right;
}

.btn-text {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-text:hover {
  color: var(--color-text-main);
}


/* Matches Section */
.matches-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.match-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.match-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-text-main);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.match-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.match-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 0 0 0.25rem 0;
  display: block;
}

.match-detail {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.match-highlight {
  color: #10b981;
  font-weight: 600;
}

/* Schedule Card Spacing */
.event-card-wrapper {
  margin-top: 6px; /* extra room so absolutely-positioned status badges (top:-10px) don't collide with the card above */
}

.event-card-wrapper:first-child {
  margin-top: 0;
}

.day-column {
  gap: 0.75rem !important; /* widen the base gap between cards */
}

/* Schedule List */
.schedule-list {
  background: white;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  overflow: hidden;
}

.schedule-day-header {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
}

.flight-item {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr 1fr;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  transition: background 0.1s;
}

.flight-item:last-child {
  border-bottom: none;
}

.flight-item:hover {
  background: #fcfcfc;
}

.cell-time {
  font-weight: 700;
  color: var(--color-text-main);
}

.cell-route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #334155;
}

.route-arrow {
  color: #cbd5e1;
  font-size: 0.8rem;
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cell-action {
  text-align: right;
}

.btn-view {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-view:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .airport-group {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .path-line {
    display: none;
  }

  .plane-icon {
    position: static;
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }

  .flight-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .cell-action {
    text-align: left;
    margin-top: 0.5rem;
  }
}

/* CSS Update for Flight List */

.flight-item {
  display: grid;
  /* Updated grid: RouteGroup (Time+Airport -> Airport+Time) | User | Action */
  grid-template-columns: 2.5fr 1fr 1fr;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  transition: background 0.1s;
}

/* Remove old columns styling overrides */
.cell-time,
.cell-route {
  display: none;
  /* Hiding old classes if they exist, or just rely on new structure */
}

/* New Route/Time Grouping */
.cell-route-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.route-time {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.text-time {
  font-weight: 700;
  color: var(--color-text-main);
  font-size: 1rem;
}

.text-time-muted {
  font-weight: 600;
  color: #94a3b8;
  font-size: 0.9rem;
}

.text-airport {
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.text-day-diff {
  font-size: 0.7rem;
  color: #dc2626;
  /* reddish for attention */
  font-weight: 700;
  vertical-align: top;
}

.route-arrow {
  color: #cbd5e1;
  font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .flight-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cell-route-group {
    justify-content: space-between;
    width: 100%;
  }

  .cell-user {
    justify-content: flex-start;
  }
}

/* Flight Status Selection Cards */

.status-selector {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.status-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

/* Hide the actual radio input visually but keep it accessible */
.status-option input[type="radio"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.status-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border: 2px solid #e1e4e8;
  border-radius: 12px;
  background-color: white;
  transition: all 0.2s ease;
  color: #64748b;
}

.status-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.status-text {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Checked State Styling */
.status-option input[type="radio"]:checked+.status-card-content {
  border-color: #C5A065;
  /* Theme Gold */
  background-color: #fffdf5;
  /* Subtle gold tint */
  color: #2D2D2D;
  /* Theme Charcoal */
  box-shadow: 0 4px 6px -1px rgba(197, 160, 101, 0.25);
  transform: translateY(-1px);
}

/* Hover State */
.status-option:hover .status-card-content {
  border-color: #C5A065;
}

/* CSS Zero Components - Dashboard Refinement */

/* Page Header Component */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.page-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Empty State Component */
.empty-state-card {
  background: white;
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-card:hover {
  border-color: var(--color-accent);
  background: #fffdf5;
  /* Subtle gold tint */
  transform: translateY(-2px);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  line-height: 1;
}

.empty-state-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
}

.empty-state-text {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 400px;
  line-height: 1.6;
}

/* Compact modifier for columns */
.empty-state-card.empty-state-card--compact {
  padding: 2rem 1.5rem;
  border-width: 1px;
  border-radius: 16px;
  margin-bottom: 0;
}

.empty-state-card.empty-state-card--compact .empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.empty-state-card.empty-state-card--compact .empty-state-text {
  font-size: 0.95rem;
  margin-bottom: 0;
  max-width: 100%;
}

/* Button Refinement */
.btn-primary-action {
  background: var(--color-text-main);
  /* Charcoal */
  color: #F9F8F6;
  /* Cream */
  padding: 1rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(45, 45, 45, 0.15);
}

.btn-primary-action:hover {
  background: var(--color-accent);
  /* Gold */
  color: var(--color-text-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(197, 160, 101, 0.25);
}

/* Enhancing existing dashboard header to map to new styles */
.dashboard-header {
  display: none;
  /* Deprecated in favor of page-header */
}

/* Mobile Responsive Dashboard Header */
@media (max-width: 767px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .page-title-group {
    width: 100%;
  }

  .page-actions {
    width: 100%;
  }

  .btn-primary-action {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
  }

  /* Ensure status bar is responsive too */
  .hero-status-bar {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Optimized Mobile Flight Item Layout */
@media (max-width: 768px) {
  .flight-item {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "route route"
      "user action" !important;
    gap: 0.75rem 1rem !important;
  }

  .cell-route-group {
    grid-area: route !important;
    width: 100% !important;
    margin-bottom: 0.25rem !important;
  }

  .cell-user {
    grid-area: user !important;
    justify-content: flex-start !important;
  }

  .cell-action {
    grid-area: action !important;
    text-align: right !important;
    margin-top: 0 !important;
    align-self: center !important;
  }

  /* Make the view button look more like a secondary action */
  .btn-view {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 99px;
    transition: all 0.2s;
    font-weight: 600;
  }

  .btn-view:hover {
    background: #e2e8f0;
    color: #334155;
    text-decoration: none;
  }
}

/* Flight List Airport Metadata */
.airport-info {
  display: flex;
  flex-direction: column;
}

.text-city {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Hidden but searchable airport name */
.text-airport-name {
  display: none;
}

/* Adjust cell alignment */
.route-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Center align the stack */
  text-align: center;
}

.route-time .text-time {
  margin-bottom: 0.1rem;
}

.route-time .text-time-muted {
  margin-top: 0.1rem;
}

/* Relax constraint on mobile to ensure visibility */
@media (max-width: 768px) {
  .text-city {
    max-width: none !important;
    white-space: normal !important;
    /* Allow wrapping on mobile if needed */
    font-size: 0.7rem;
    /* Slightly smaller to fit */
  }

  /* Ensure parent container allows growth */
  .airport-info {
    width: 100%;
    align-items: center;
  }
}

/* Autocomplete Styles */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-items {
  position: absolute;
  border: 1px solid #d1d5db;
  border-bottom: none;
  border-top: none;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-height: 300px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 10px;
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
  color: #374151;
}

.autocomplete-item:hover {
  background-color: #f3f4f6;
}

.autocomplete-active {
  background-color: #db2777 !important;
  color: #ffffff;
}

.autocomplete-item strong {
  font-weight: 600;
  color: #111827;
}

.autocomplete-active strong {
  color: #ffffff;
}
/* Global Tab Buttons (Rides/Stays/Flights) */
.tab-button {
  flex: 1;
  padding: 0.4rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-button-active {
  background: white;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tab-button-inactive {
  background: transparent;
  color: #6b7280;
  box-shadow: none;
}

/* ─── Shared chrome wrapper for trip tabs ───────────────────────
   Used by shared/_trip_chrome partial. Keeps breadcrumbs + section
   nav at one canonical width across Overview, Rides & Rooms,
   Hotel Deals, My Trip — so Turbo body-swaps don't shift the nav. */
.trip-chrome {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1rem 0;
}

/* ─── Global desktop sidebar ─────────────────────────────────────
   Rendered by shared/_global_sidebar partial. Fixed left rail with
   workspace identity, top-level destinations, trip list, user card.
   Hidden on tablet/mobile (< 1024px) where the existing top header
   and mobile tab bar carry the navigation. */
.global-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: var(--color-neutral-cream);
  border-right: 1px solid var(--color-neutral-fog);
  padding: 1rem 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  overflow-y: auto;
  z-index: 20;
}
/* Shift main content right by the sidebar's width. Use margin (not padding)
   so it composes with `<main>`'s inline `width: 100%` without overflow — and
   !important to beat that inline declaration. */
.has-global-sidebar {
  margin-left: 240px !important;
  width: calc(100% - 240px) !important;
}
main.has-global-sidebar.chat-page {
  margin-left: 72px !important;
  width: calc(100% - 72px) !important;
}
@media (max-width: 1023px) {
  .global-sidebar { display: none; }
  .has-global-sidebar,
  main.has-global-sidebar.chat-page {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

.global-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem 1rem;
  text-decoration: none;
}
.global-sidebar__brand-wm { display: inline-flex; align-items: center; justify-content: flex-start; }

.global-sidebar--rail {
  width: 72px;
  padding: 1rem 0.5rem 0.875rem;
  align-items: stretch;
  overflow-x: hidden;
}
.global-sidebar--rail .global-sidebar__brand {
  justify-content: center;
  padding-inline: 0;
}
.global-sidebar--rail .global-sidebar__brand-wm,
.global-sidebar--rail .global-sidebar__row-label,
.global-sidebar--rail .global-sidebar__row-gloss,
.global-sidebar--rail .global-sidebar__section-title,
.global-sidebar--rail .global-sidebar__section-divider,
.global-sidebar--rail .global-sidebar__direct-body,
.global-sidebar--rail .global-sidebar__trip-body,
.global-sidebar--rail .global-sidebar__me-body {
  display: none;
}
.global-sidebar--rail .global-sidebar__row,
.global-sidebar--rail .global-sidebar__direct,
.global-sidebar--rail .global-sidebar__trip {
  justify-content: center;
  gap: 0;
  padding-inline: 0;
  min-height: 40px;
  position: relative;
}
.global-sidebar--rail .global-sidebar__row.is-active,
.global-sidebar--rail .global-sidebar__direct.is-active,
.global-sidebar--rail .global-sidebar__trip.is-active {
  box-shadow: inset 3px 0 0 var(--color-brand-primary);
}
.global-sidebar--rail .global-sidebar__section {
  justify-content: center;
  margin: 0.75rem 0 0.25rem;
  padding: 0;
}
.global-sidebar--rail .global-sidebar__section::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--color-neutral-fog);
}
.global-sidebar--rail .global-sidebar__badge {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 16px;
  padding: 0 4px;
  text-align: center;
  line-height: 16px;
}
.global-sidebar--rail .global-sidebar__me {
  justify-content: center;
  padding-inline: 0;
}

.global-sidebar__row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 0.625rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-neutral-graphite);
  margin-bottom: 1px;
}
.global-sidebar__row:hover { background: rgba(0, 0, 0, 0.03); }
.global-sidebar__row.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--color-brand-primary);
  color: var(--color-neutral-ink);
}
.global-sidebar__row.is-active .global-sidebar__row-label { font-weight: 700; }
.global-sidebar__row--direct-messages {
  color: var(--color-neutral-ink);
}
.global-sidebar__row--direct-messages .global-sidebar__row-label {
  font-weight: 700;
}
.global-sidebar__row--direct-messages svg {
  color: var(--color-brand-primary);
}
.global-sidebar__row--muted { color: var(--color-neutral-slate); }
.global-sidebar__row--coming {
  color: var(--color-neutral-stone);
  cursor: not-allowed;
}
.global-sidebar__row-label {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
}
.global-sidebar__row-gloss {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--color-neutral-stone);
  font-size: 0.72rem;
}

.global-sidebar__badge {
  font-family: var(--font-mono);
  font-size: 0.594rem;
  font-weight: 700;
  color: var(--color-brand-primary);
  background: var(--color-brand-primary-light);
  padding: 1px 6px;
  border-radius: 99px;
}
/* Activity is a digest you can read whenever; unread chat is someone waiting on
   you. Activity therefore reads quieter than the Chats badge, which used to be
   the other way round — a filled coral 70 shouting over a pale blue 13. */
.global-sidebar__badge--accent {
  background: transparent;
  color: var(--color-neutral-stone);
  border: 1px solid var(--color-neutral-fog);
  font-weight: 650;
}
/* Chats: filled, brand-primary, slightly larger — the loudest badge in the rail. */
.global-sidebar__badge--chats {
  background: var(--color-brand-primary);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1.5px 7px;
}
.global-sidebar__badge--invert {
  background: var(--color-brand-primary);
  color: #fff;
}

.global-sidebar__section {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0.875rem 0 0.375rem;
  padding: 0.25rem 0.5rem;
}
.global-sidebar__section-title {
  font-family: var(--font-mono);
  font-size: 0.594rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-neutral-stone);
  text-transform: uppercase;
}
.global-sidebar__section-divider {
  flex: 1;
  height: 1px;
  background: var(--color-neutral-fog);
}
.global-sidebar__section--direct {
  margin-top: 1rem;
}

.global-sidebar__direct {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.375rem 0.625rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1px;
}
.global-sidebar__direct:hover { background: rgba(0, 0, 0, 0.03); }
.global-sidebar__direct.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--color-brand-primary);
}
.global-sidebar__direct-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.56rem;
  font-weight: 700;
  flex-shrink: 0;
}
.global-sidebar__direct-body { flex: 1; min-width: 0; }
.global-sidebar__direct-name {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-sidebar__direct.is-active .global-sidebar__direct-name {
  color: var(--color-neutral-ink);
}
.global-sidebar__direct-trip {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  color: var(--color-neutral-stone);
  letter-spacing: 0.06em;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-sidebar__trip {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.4375rem 0.625rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1px;
}
.global-sidebar__trip:hover { background: rgba(0, 0, 0, 0.03); }
.global-sidebar__trip.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--color-brand-primary);
}
.global-sidebar__trip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(160deg, #D17B3A, #8A4A1F);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.594rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.global-sidebar__trip-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.global-sidebar__trip-body { flex: 1; min-width: 0; }
.global-sidebar__trip-name {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-sidebar__trip.is-active .global-sidebar__trip-name {
  font-weight: 700;
  color: var(--color-neutral-ink);
}
.global-sidebar__trip-meta {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--color-neutral-stone);
  letter-spacing: 0.08em;
  margin-top: 1px;
}

.global-sidebar__see-all {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.4375rem 0.625rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-neutral-slate);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  margin-top: 2px;
  margin-bottom: 4px;
  transition: background 120ms ease, color 120ms ease;
}
.global-sidebar__see-all:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-brand-primary);
}
.global-sidebar__see-all-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--color-neutral-linen, #F1ECE3);
  color: var(--color-neutral-slate);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.global-sidebar__see-all:hover .global-sidebar__see-all-icon {
  background: var(--color-brand-primary-light, #EAF0F8);
  color: var(--color-brand-primary);
}
.global-sidebar__see-all-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-sidebar__see-all-arrow {
  font-size: 0.72rem;
  color: var(--color-neutral-stone);
  transition: transform 120ms ease;
}
.global-sidebar__see-all:hover .global-sidebar__see-all-arrow {
  transform: translateX(2px);
  color: var(--color-brand-primary);
}

.global-sidebar--rail .global-sidebar__see-all {
  justify-content: center;
  padding: 0.4375rem 0;
}
.global-sidebar--rail .global-sidebar__see-all-label,
.global-sidebar--rail .global-sidebar__see-all-arrow {
  display: none !important;
}

.global-sidebar__me {
  margin-top: auto;
  padding: 0.625rem 0.5rem 0;
  border-top: 1px solid var(--color-neutral-fog);
  display: flex;
  align-items: center;
  gap: 0.5625rem;
}
.global-sidebar__me-link {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 0.125rem 0.25rem;
  margin: -0.125rem -0.25rem;
  transition: background-color 0.15s ease;
}
.global-sidebar__me-link:hover {
  background-color: rgba(0, 0, 0, 0.04);
}
.global-sidebar__logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--color-neutral-stone);
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.global-sidebar__logout-btn:hover {
  color: #dc2626;
  background-color: #fee2e2;
}
.global-sidebar__me-avatar {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  flex-shrink: 0;
}
.global-sidebar__me-body { flex: 1; min-width: 0; }
.global-sidebar__me-name {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-sidebar__me-status {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--color-semantic-positive);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.global-sidebar__me-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--color-semantic-positive);
  display: inline-block;
}

/* ════════════════════════════════════════════════════════════════════
   Travel hub quick-post sheet
   Global (loaded in <head>) and self-contained so it renders reliably
   regardless of the Travel page's scoped inline styles. Scoped under
   .psheet to avoid collisions; opened by the post-sheet Stimulus controller.
   ════════════════════════════════════════════════════════════════════ */
/* border-box so width:100% + padding doesn't overflow (no global reset here). */
.psheet, .psheet *, .psheet *::before, .psheet *::after { box-sizing: border-box; }
.psheet { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; overscroll-behavior: contain; }
.psheet[hidden] { display: none; }
.psheet__scrim { position: absolute; inset: 0; background: rgba(21,20,19,0.45); touch-action: none; }
.psheet .pcard { position: relative; width: 472px; max-width: 100%; max-height: min(85dvh, calc(100vh - 40px)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: #FFFDF8; border: 1px solid #E3DED5; border-radius: 20px; box-shadow: 0 24px 64px rgba(21,20,19,0.3); padding: 26px 26px 22px; font-family: 'Nunito', system-ui, sans-serif; }
.psheet .pchoice button .cs { overflow-wrap: anywhere; }
.psheet .pcard[hidden] { display: none; }
/* Lock the page behind the sheet so swiping the sheet doesn't scroll it. */
body.psheet-open { overflow: hidden; }
.psheet .pclose { position: absolute; top: 15px; right: 15px; border: 0; background: transparent; color: #8A847A; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.psheet .pclose:hover { background: #FAF6EE; color: #151413; }
.psheet .pclose svg { width: 17px; height: 17px; }
.psheet .peye { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #5B4A9A; }
.psheet .ptitle { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 7px 0 0; color: #151413; }
.psheet .pinherit { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 13px; background: #F0EBF8; border: 1px solid #E4DBF3; border-radius: 10px; font-size: 12.5px; color: #5B4A9A; font-weight: 600; }
.psheet .pinherit svg { width: 14px; height: 14px; flex-shrink: 0; }
.psheet .pinherit span { min-width: 0; overflow-wrap: anywhere; }
.psheet .pchoice { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.psheet .pchoice button { text-align: left; border: 1.5px solid #E3DED5; background: #FFFDF8; border-radius: 13px; padding: 12px 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.psheet .pchoice button .ct { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: #151413; }
.psheet .pchoice button .cs { display: block; font-size: 12px; color: #8A847A; margin-top: 4px; line-height: 1.35; }
.psheet .pchoice button .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #B8B3A9; flex-shrink: 0; transition: all .15s; }
.psheet .pchoice button.on { border-color: #7B61C9; background: #F0EBF8; }
.psheet .pchoice button.on .dot { border-color: #7B61C9; background: #7B61C9; box-shadow: inset 0 0 0 2px #fff; }
.psheet .pfields { margin-top: 16px; display: flex; flex-direction: column; gap: 11px; }
.psheet .prow { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.psheet .pf { display: flex; flex-direction: column; gap: 5px; }
.psheet .pf label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #8A847A; }
.psheet .pf input { width: 100%; border: 1px solid #E3DED5; background: #FAF6EE; border-radius: 10px; padding: 11px 13px; font-family: inherit; font-size: 14px; font-weight: 500; color: #151413; }
.psheet .pf input:focus { outline: none; border-color: #7B61C9; background: #fff; }
.psheet .psecondary { width: 100%; border: 1px solid #D8D0C3; background: #fff; color: #151413; font-size: 14px; font-weight: 700; padding: 11px 14px; border-radius: 10px; cursor: pointer; }
.psheet .psecondary:hover { border-color: #7B61C9; color: #5B4A9A; }
.psheet .psecondary:disabled { cursor: wait; opacity: 0.7; }
.psheet .flight-quick-lookup { min-width: 0; padding: 12px; background: #FAF6EE; border: 1px solid #E3DED5; border-radius: 12px; }
.psheet .flight-quick-lookup__hint { font-size: 12px; line-height: 1.35; color: #8A847A; }
.psheet .flight-quick-lookup__results { display: flex; flex-direction: column; gap: 7px; margin-top: 7px; max-height: min(42vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; }
.psheet .flight-quick-lookup__results[hidden] { display: none; }
.psheet .flight-quick-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding-top: 2px; }
.psheet .flight-quick-filter label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #8A847A; }
.psheet .flight-quick-filter select { min-width: 0; width: 100%; border: 1px solid #E3DED5; background: #FFFDF8; border-radius: 9px; padding: 9px 10px; font-family: inherit; font-size: 13.5px; font-weight: 600; color: #151413; }
.psheet .flight-quick-filter select:focus { outline: none; border-color: #7B61C9; background: #fff; }
.psheet .flight-quick-result { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #E3DED5; background: #FFFDF8; border-radius: 10px; padding: 10px; text-align: left; font-family: inherit; cursor: pointer; }
.psheet .flight-quick-result:hover { border-color: #7B61C9; background: #fff; }
.psheet .flight-quick-result span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.psheet .flight-quick-result strong { font-size: 13.5px; color: #151413; overflow-wrap: anywhere; }
.psheet .flight-quick-result em, .psheet .flight-quick-result span:last-child { font-size: 12px; color: #8A847A; font-style: normal; white-space: nowrap; }
.psheet .flight-quick-message { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; background: #FFFDF8; border: 1px dashed #D8D0C3; border-radius: 10px; font-size: 12.5px; line-height: 1.35; color: #5A564F; }
.psheet .flight-quick-fallback { flex-shrink: 0; border: 0; background: transparent; color: #5B4A9A; font-family: inherit; font-size: 12.5px; font-weight: 800; padding: 0; cursor: pointer; }
.psheet .flight-manual-fallback { border-top: 1px dashed #D8D0C3; padding-top: 10px; }
.psheet .flight-manual-fallback summary { color: #8A847A; cursor: pointer; font-size: 12px; font-weight: 700; line-height: 1.35; }
.psheet .flight-manual-fallback summary:hover { color: #5B4A9A; }
.psheet .flight-manual-fallback .pf { margin-top: 9px; }
/* Booked/watching + privacy: one compact band, not two labelled sections. */
.psheet .pmeta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
/* The selected pill carries its own radius and sits inside a padded track, so
   nothing depends on overflow:hidden clipping a child background against a
   99px radius — iOS Safari rounds that a pixel short and shaves the bottom. */
.psheet .pmeta__status { display: inline-flex; align-items: stretch; gap: 2px; padding: 3px; border: 1px solid #E3DED5; border-radius: 99px; background: #FAF6EE; }
.psheet .pmeta__opt { position: relative; display: flex; }
.psheet .pmeta__opt input { position: absolute; opacity: 0; pointer-events: none; }
.psheet .pmeta__opt span { display: flex; align-items: center; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; line-height: 1.2; color: #8A847A; cursor: pointer; transition: background .15s, color .15s; }
.psheet .pmeta__opt input:checked + span { background: #7B61C9; color: #fff; }
.psheet .pmeta__opt input:focus-visible + span { outline: 2px solid #5B4A9A; outline-offset: 1px; }
.psheet .pmeta__private { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #5A564F; cursor: pointer; }
.psheet .pmeta__private input { width: 16px; height: 16px; accent-color: #7B61C9; flex-shrink: 0; }

.psheet .pfoot { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.psheet .ppost { border: 0; background: #7B61C9; color: #fff; font-size: 14.5px; font-weight: 600; padding: 13px 22px; border-radius: 99px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s; }
.psheet .ppost:hover { background: #5B4A9A; }
.psheet .ppost svg { width: 15px; height: 15px; }
.psheet .pcancel { border: 0; background: transparent; color: #5A564F; font-size: 14px; font-weight: 600; cursor: pointer; }
/* Sits on the eyebrow row, right-aligned — it used to trail the Cancel
   button, where "Cancel  as Irfan Baig" read as a single phrase. */
/* Right padding keeps "Posting as …" clear of the absolutely-placed close X. */
.psheet .phead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 34px; }
.psheet .phead .peye { min-width: 0; }
.psheet .pwho { flex-shrink: 0; font-size: 12px; color: #A8A29A; white-space: nowrap; }

/* Flatpickr's default month arrows are visually tiny and hard to tap on mobile. */
.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #D8D0C3;
  border-radius: 12px;
  background: #FFFDF8;
  box-shadow: 0 2px 8px rgba(21, 20, 19, 0.08);
  color: #151413;
  fill: #151413;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:hover,
.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:focus-visible,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:focus-visible {
  background: #F0EBF8;
  border-color: #B9A8E2;
  box-shadow: 0 4px 12px rgba(91, 74, 154, 0.18);
  color: #5B4A9A;
  fill: #5B4A9A;
  outline: none;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:active,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(21, 20, 19, 0.12);
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month svg,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month svg path,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month svg path {
  fill: currentColor;
}

/* Google Places autocomplete dropdown must sit above the sheet (z 1200). */
.pac-container {
  z-index: 1300 !important;
  min-width: min(34rem, calc(100vw - 2rem)) !important;
  max-width: calc(100vw - 2rem) !important;
  border-radius: 8px;
  overflow: hidden;
}

.pac-container .pac-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  white-space: normal;
  line-height: 1.25;
}

.pac-container .pac-icon {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.pac-container .pac-item-query,
.pac-container .pac-matched {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* The bottom tab bar would otherwise cover the sheet's submit button. */
body.psheet-open .mobile-bottom-tabs { display: none !important; }

/* Mobile: dock to the bottom as a true bottom-sheet */
@media (max-width: 720px) {
  .psheet { align-items: flex-end; padding: 0; }
  /* 85dvh, not 92vh: leave the page visible behind the sheet so it still reads
     as a sheet over Travel rather than a full-screen takeover. dvh keeps it
     honest while mobile Safari's toolbar expands and collapses. */
  .psheet .pcard { width: 100%; max-width: 100%; max-height: 85dvh; border-radius: 22px 22px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px)); animation: psheet-up .22s ease; }
  .psheet .pcard::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 99px; background: #B8B3A9; margin: 0 auto 12px; }
  .psheet .pinherit,
  .psheet .flight-quick-lookup,
  .psheet .flight-quick-lookup__hint,
  .psheet .flight-quick-filter,
  .psheet .flight-quick-result { max-width: 100%; min-width: 0; }
  .psheet .prow { grid-template-columns: 1fr; }
  .psheet .flight-quick-filter { grid-template-columns: 1fr; }
  .psheet .flight-quick-result { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 11px 12px 12px; min-height: 96px; }
  .psheet .flight-quick-result span:first-child { min-width: 0; gap: 4px; width: 100%; }
  .psheet .flight-quick-result strong { font-size: 13px; line-height: 1.18; }
  .psheet .flight-quick-result em { margin-top: 0; }
  .psheet .flight-quick-result span:last-child { text-align: right; font-size: 11.5px; color: #8A847A; }
  .psheet .flight-quick-result em,
  .psheet .flight-quick-result span:last-child { display: block; width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  /* Footer items must wrap — otherwise their combined min-width forces the
     whole card wider than the phone, spilling content off both edges. */
  .psheet .pfoot { flex-wrap: wrap; row-gap: 6px; }
  .psheet .ppost { order: -1; flex: 1 0 100%; justify-content: center; }
}
@keyframes psheet-up { from { transform: translateY(100%); } to { transform: none; } }

/* ---------------------------------------------------------------------------
   Share icon (shared/_share_button.html.erb)

   Both glyphs ship in the markup and CSS picks the platform's own convention
   from the plat-* class on <html> — the page HTML itself stays identical for
   every visitor, so it survives HTTP/Turbo caching that keys on URL alone.
   Apple is the explicit case; Android and every desktop browser get the
   Material node glyph, which is the more widely-read symbol off Apple.
--------------------------------------------------------------------------- */
.share-btn {
  position: relative; /* anchors the visually-hidden status region */
  -webkit-tap-highlight-color: transparent;
}

/* Sharing your itinerary is the one outward-facing action on this screen, so
   the button is lifted off the bar rather than sunk into it like the neutral
   grey chips: a round white surface, a soft brand-tinted shadow, and the glyph
   in the brand blue. Matches how the native shells treat the same button —
   iOS tints its bar glyph with the app's accent (see ButtonComponent's
   tintColor(for:)) instead of leaving it graphite chrome. */
.share-btn.topbar-btn {
  border-radius: 50%;
  background: var(--color-neutral-white, #ffffff);
  border: 1px solid var(--color-neutral-fog, #e3ded5);
  color: var(--color-brand-primary, #4a6fa5);
  box-shadow:
    0 1px 2px rgba(42, 39, 36, 0.05),
    0 6px 16px -8px rgba(74, 111, 165, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.share-btn.topbar-btn:hover {
  background: var(--color-brand-primary-light, #eaf0f8);
  border-color: var(--color-brand-primary-light, #eaf0f8);
  color: var(--color-brand-primary, #4a6fa5);
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(42, 39, 36, 0.06),
    0 10px 22px -10px rgba(74, 111, 165, 0.45);
}

.share-btn.topbar-btn:active {
  transform: translateY(0) scale(0.94);
  box-shadow: 0 1px 2px rgba(42, 39, 36, 0.06);
}

/* Confirmed state reads as done, not as another invitation to tap. */
.share-btn.topbar-btn.is-copied {
  background: var(--color-semantic-positive-light, #e4f3ec);
  border-color: var(--color-semantic-positive-light, #e4f3ec);
  box-shadow: none;
}

.share-btn__glyph {
  display: none;
  flex-shrink: 0;
}

.plat-apple .share-btn__glyph--apple,
.share-btn__glyph--material { display: block; }

.plat-apple .share-btn__glyph--material { display: none; }

/* Copy confirmation swaps the glyph for a checkmark in place. Sizing is
   identical, so the button never reflows and never loses its icon. */
.share-btn__glyph--copied { display: none; }
.share-btn.is-copied .share-btn__glyph--apple,
.share-btn.is-copied .share-btn__glyph--material { display: none; }
.share-btn.is-copied .share-btn__glyph--copied {
  display: block;
  color: var(--color-semantic-positive, #15803d);
}

@media (prefers-reduced-motion: reduce) {
  .share-btn.topbar-btn,
  .share-btn.topbar-btn:hover,
  .share-btn.topbar-btn:active {
    transition: none;
    transform: none;
  }
}

/* Announced to screen readers on copy; never visible. */
.share-btn__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
