/**
 * EPIC12 Homepage Styles — Sprint 12.12.7C PREMIUM NATIVE UI
 *
 * Design System: Premium Multi-tone Blue, 18px Cards, Soft Shadows
 * Mobile-First. Native Android/iOS feel (Grab, Be, Airbnb quality)
 *
 * Navy Blue #1F4E8C → ACCENT ONLY (Buttons, CTAs, Selected Tabs)
 *
 * @package XOS_Lite
 * @version 7.0.0
 * @since   Sprint 12.12.7C
 */

/* ===========================================================
     PHASE 1: Hide legacy listing-website patterns
   =========================================================== */

.ep12-home .hero-banner,
.ep12-home .marketing-banner,
.ep12-home .statistics-blocks,
.ep12-home .duplicate-cta,
.ep12-home .footer-cta,
.ep12-home .copyright,
.ep12-home .back-to-top,
.ep12-home .widget,
.ep12-home .widget-area,
.ep12-home .sidebar,
.ep12-home .decorative-section,
.ep12-home .news-feed,
.ep12-home .dashboard-cards {
  display: none !important;
}

.ep12-fab {
  display: none !important;
}

.ep12-bottom-spacer {
  display: none;
}

.ep12-search-tabs,
.ep12-search-tab,
.ep12-search-tab-icon,
.ep12-search-tab-label {
  display: none;
}

/* ===========================================================
     1. ROOT — EPIC12 Homepage Container
    =========================================================== */

.ep12-home {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: #F6F9FD;
  overflow-x: hidden;
}

.ep12-container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 8px;
}

/* ===========================================================
     2. SECTION & HEADER — Premium Typography
    =========================================================== */

.ep12-section {
  padding: 8px 0;
}

.ep12-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ep12-section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.125rem;   /* 18px */
  font-weight: 700;
  color: #1F2937;
}

.ep12-section-link {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;    /* 12px caption */
  font-weight: 600;
  color: #2F80ED;
  text-decoration: none;
  transition: color 150ms ease;
}

.ep12-section-link:hover {
  color: #1F4E8C;
}

/* ===========================================================
     3. SEARCH CARD SECTION — Premium White Card
     Sprint 12.12.7C: 18px radius, soft shadow
    =========================================================== */

.ep12-search-section {
  background: transparent;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Premium White Card */
.ep12-hero-search {
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
  border: 1px solid #E7EEF7;
  overflow: visible;
}

.ep12-hero-search-inner {
  padding: 8px;
}

/* ===========================================================
     4. INTENT GRID — 2×2 Marketplace Intent Cards
    =========================================================== */

.ep12-intent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.ep12-intent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  min-height: 56px;
  border: 1.5px solid #E7EEF7;
  border-radius: 14px;
  background: #F3F6FA;
  color: #64748B;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
  touch-action: manipulation;
}

.ep12-intent-card:hover {
  border-color: #2F80ED;
  background: #E8F0FE;
}

.ep12-intent-card:active {
  transform: scale(0.98);
}

.ep12-intent-card:focus-visible {
  outline: 2px solid #1F4E8C;
  outline-offset: 2px;
}

.ep12-intent-card.active {
  background: #1F4E8C;
  color: #ffffff;
  border-color: #1F4E8C;
  box-shadow: 0 2px 12px rgba(31, 78, 140, 0.20);
  transform: scale(1.02);
}

.ep12-intent-card.active:hover {
  background: #1A4075;
}

.ep12-intent-icon {
  font-size: 20px;
  line-height: 1;
}

.ep12-intent-label {
  font-size: 0.625rem;    /* 10px caption */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  text-align: center;
  line-height: 1.3;
}

/* ===========================================================
     5. SEARCH FIELDS — Compact, native feel
    =========================================================== */

.ep12-search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-end;
}

.ep12-search-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 140px;
  min-width: 130px;
}

.ep12-search-field-origin,
.ep12-search-field-dest {
  flex: 2 1 180px;
}

/* Labels */
.ep12-search-label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.625rem;    /* 10px */
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0;
  line-height: 1;
}

.ep12-search-label svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* Input Wrapper */
.ep12-search-autocomplete-wrap {
  position: relative !important;
  display: flex;
  align-items: center;
  overflow: visible !important;
}

/* Input Fields */
.ep12-search-input {
  width: 100%;
  padding: 8px 8px;
  padding-right: 80px;
  border: 1px solid #D4DFEC;
  border-radius: 12px;
  background: #F3F6FA;
  color: #1F2937;
  font-size: 1rem;        /* 16px body */
  font-family: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  outline: none;
  min-height: 48px;
  box-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep12-search-input:focus {
  border-color: #1F4E8C;
  box-shadow: 0 0 0 3px rgba(31, 78, 140, 0.08);
  background: #FFFFFF;
  overflow-x: auto;
  text-overflow: clip;
  white-space: nowrap;
}

.ep12-search-input::placeholder {
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* Search Icon (left side of input) */
.ep12-search-icon-wrap {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #9CA3AF;
  pointer-events: none;
  z-index: 1;
}

/* Clear Button */
.ep12-search-clear-btn {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #D4DFEC;
  color: #64748B;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: background 150ms ease, color 150ms ease;
}

.ep12-search-clear-btn:hover {
  background: #64748B;
  color: #FFFFFF;
}

/* Loading Spinner inside input */
.ep12-search-spinner {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #E7EEF7;
  border-top-color: #1F4E8C;
  border-radius: 50%;
  animation: ep12-spin 0.6s linear infinite;
  z-index: 2;
  pointer-events: none;
}

/* Input padding adjustments for premium layout */
.ep12-search-field-origin .ep12-search-input,
.ep12-search-field-dest .ep12-search-input {
  padding-left: 38px;
  padding-right: 84px;
}

/* Map Pick Button */
.ep12-map-pick-btn {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1F4E8C;
  cursor: pointer;
  transition: background 150ms ease;
  padding: 0;
  min-width: 48px;
  min-height: 48px;
  z-index: 1;
}

.ep12-map-pick-btn:hover {
  background: #E8EDF5;
}

.ep12-map-pick-btn:focus-visible {
  outline: 2px solid #1F4E8C;
  outline-offset: 2px;
}

/* ===========================================================
     6. AUTOCOMPLETE DROPDOWN
    =========================================================== */

.ep12-autocomplete-dropdown {
  display: none !important;
  /* SPRINT 12.28: position/top/left/width now controlled by JS portal (getBoundingClientRect).
     Do NOT use !important here — let inline styles win. */
  position: fixed;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  background-color: #ffffff !important;
  border: 1px solid #D4DFEC;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  z-index: 999999 !important;
  animation: ep12-ac-slide-in 150ms ease-out;
  transform-origin: top center;
  /* Prevent viewport overflow */
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}

.ep12-autocomplete-dropdown.active {
  display: block !important;
}

@keyframes ep12-ac-slide-in {
  from { opacity: 0; transform: translateY(-8px) scaleY(0.95); }
  to   { opacity: 1; transform: translateY(0) scaleY(1); }
}

.ep12-autocomplete-item {
  padding: 8px;
  font-size: 0.875rem;
  color: #1F2937;
  cursor: pointer;
  transition: background 150ms ease;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

.ep12-autocomplete-item + .ep12-autocomplete-item {
  border-top: 1px solid #E7EEF7;
}

.ep12-autocomplete-item:hover,
.ep12-autocomplete-item.highlighted {
  background: #E8EDF5;
  border-radius: 0;
}

.ep12-autocomplete-item:first-child:hover,
.ep12-autocomplete-item:first-child.highlighted {
  border-radius: 12px 12px 0 0;
}

.ep12-autocomplete-item:last-child:hover,
.ep12-autocomplete-item:last-child.highlighted {
  border-radius: 0 0 12px 12px;
}

.ep12-ac-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F3F6FA;
  color: #64748B;
}

.ep12-ac-icon svg {
  width: 16px;
  height: 16px;
}

.ep12-ac-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ep12-ac-name {
  font-weight: 500;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.ep12-ac-region {
  font-size: 0.6875rem;
  color: #9CA3AF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep12-autocomplete-item-empty {
  padding: 16px 12px;
  text-align: center;
  color: #9CA3AF;
  font-size: 0.75rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ep12-ac-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  color: #9CA3AF;
  font-size: 0.75rem;
}

.ep12-ac-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #E7EEF7;
  border-top-color: #1F4E8C;
  border-radius: 50%;
  animation: ep12-spin 0.6s linear infinite;
}

@keyframes ep12-spin {
  to { transform: rotate(360deg); }
}

/* ===========================================================
     7. SWAP BUTTON
    =========================================================== */

.ep12-search-swap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #D4DFEC;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1F4E8C;
  cursor: pointer;
  transition: all 150ms ease;
  margin-bottom: 2px;
  padding: 0;
  flex-shrink: 0;
  min-width: 48px;
  min-height: 48px;
}

.ep12-search-swap:hover {
  background: #E8EDF5;
  transform: rotate(180deg);
}

.ep12-search-swap:focus-visible {
  outline: 2px solid #1F4E8C;
  outline-offset: 2px;
}

/* ===========================================================
     8. SEARCH ACTIONS — Equal height premium buttons
    =========================================================== */

.ep12-search-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.ep12-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 150ms ease;
  min-height: 48px;
  height: 48px;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}

.ep12-search-btn:focus-visible {
  outline: 2px solid #1F4E8C;
  outline-offset: 2px;
}

.ep12-search-btn svg {
  flex-shrink: 0;
}

/* Primary Search — Soft Blue Gradient */
.ep12-search-btn-primary {
  flex: 2;
  background: linear-gradient(135deg, #2F80ED 0%, #1F4E8C 100%);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(31, 78, 140, 0.20);
}

.ep12-search-btn-primary:hover {
  background: linear-gradient(135deg, #5395e9 0%, #2D63B3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(31, 78, 140, 0.28);
}

.ep12-search-btn-primary:active {
  background: linear-gradient(135deg, #1F4E8C 0%, #15355F 100%);
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(31, 78, 140, 0.15);
}

.ep12-search-btn-map {
  flex: 1;
  background: #F3F6FA;
  color: #2F80ED;
  border: 1px solid #D4DFEC;
  height: 48px;
}

.ep12-search-btn-map:hover {
  background: #E8F0FE;
  border-color: #2F80ED;
}

.ep12-search-btn-map:active {
  background: #C5D9F9;
}

/* ===========================================================
     9. FULLSCREEN MAP OVERLAY
    =========================================================== */

.ep12-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  animation: ep12-map-enter 300ms ease;
}

@keyframes ep12-map-enter {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.ep12-map-overlay-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid #E7EEF7;
  background: #FFFFFF;
  flex-shrink: 0;
}

.ep12-map-overlay-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ep12-map-overlay-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1F2937;
}

.ep12-map-overlay-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1F2937;
  cursor: pointer;
  transition: background 150ms ease;
  padding: 0;
}

.ep12-map-overlay-close:hover {
  background: #F3F6FA;
}

/* MAP SEARCH BAR */
.ep12-map-search-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F3F6FA;
  border-radius: 12px;
  padding: 0 8px;
  border: 1px solid #D4DFEC;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ep12-map-search-bar:focus-within {
  border-color: #1F4E8C;
  box-shadow: 0 0 0 3px rgba(31, 78, 140, 0.08);
  background: #FFFFFF;
}

.ep12-map-search-bar svg {
  flex-shrink: 0;
  color: #9CA3AF;
}

.ep12-map-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 0;
  font-size: 0.875rem;
  font-family: inherit;
  color: #1F2937;
  outline: none;
  min-height: 48px;
}

.ep12-map-search-input::placeholder {
  color: #9CA3AF;
}

.ep12-map-ac-dropdown {
  position: fixed;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #D4DFEC;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  z-index: 99999 !important;
  display: none;
  margin-top: 4px;
}

/* Sprint 12.27: Ensure map search wrap allows overflow and positioning */
.ep12-map-search-wrap {
  position: relative !important;
  overflow: visible !important;
}
.ep12-map-search-wrap .ep12-map-ac-dropdown,
.ep12-map-search-wrap .ep12-map-ac-dropdown * {
  max-width: none !important;
}

.ep12-map-ac-dropdown.active {
  display: block;
}

.ep12-map-ac-item {
  padding: 8px;
  font-size: 0.8125rem;
  color: #1F2937;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 150ms ease;
}

.ep12-map-ac-item:hover,
.ep12-map-ac-item.highlighted {
  background: #E8EDF5;
}

.ep12-map-ac-item + .ep12-map-ac-item {
  border-top: 1px solid #E7EEF7;
}

.ep12-map-search-wrap {
  position: relative;
  flex: 1;
}

/* Current Location Button */
.ep12-map-locate-btn {
  position: absolute;
  bottom: 20px;
  right: 12px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  color: #1F4E8C;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding: 0;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  user-select: none;
  touch-action: manipulation;
  min-width: 48px;
  min-height: 48px;
}

.ep12-map-locate-btn:hover {
  background: #E8EDF5;
  box-shadow: 0 4px 12px rgba(31, 78, 140, 0.18);
  transform: scale(1.05);
}

.ep12-map-locate-btn:active {
  transform: scale(0.95);
}

.ep12-map-locate-btn:focus-visible {
  outline: 2px solid #1F4E8C;
  outline-offset: 2px;
}

.ep12-map-locate-btn.locating {
  color: #9CA3AF;
  pointer-events: none;
}

.ep12-map-locate-btn.locating::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid #E7EEF7;
  border-top-color: #1F4E8C;
  animation: ep12-spin 0.6s linear infinite;
}

.ep12-map-overlay-body {
  flex: 1;
  background: #F6F9FD;
  position: relative;
  min-height: 300px;
}

.ep12-map-overlay-body .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

.ep12-map-overlay-footer {
  display: flex;
  justify-content: center;
  padding: 8px;
  border-top: 1px solid #E7EEF7;
  background: #FFFFFF;
  flex-shrink: 0;
}

.ep12-map-save-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 32px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2F80ED 0%, #1F4E8C 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms ease;
  min-height: 48px;
  height: 48px;
  width: 100%;
  max-width: 360px;
}

.ep12-map-save-btn:hover {
  background: linear-gradient(135deg, #5395e9 0%, #2D63B3 100%);
}

.ep12-map-save-btn:active {
  background: linear-gradient(135deg, #1F4E8C 0%, #15355F 100%);
}

/* Map placeholder */
.ep12-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748B;
}

.ep12-map-placeholder-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.ep12-map-placeholder p {
  margin: 4px 0;
  font-size: 0.875rem;
}

.ep12-map-placeholder-hint {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ===========================================================
     10. QUICK ACTIONS — 3-item grid
    =========================================================== */

.ep12-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
}

.ep12-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
  background: #FFFFFF;
  border: 1px solid #E7EEF7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
}

.ep12-quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.ep12-quick-action:active {
  transform: scale(0.98);
}

.ep12-quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transition: transform 150ms ease;
}

.ep12-quick-action:hover .ep12-quick-action-icon {
  transform: scale(1.08);
}

.ep12-quick-action-icon svg {
  width: 22px;
  height: 22px;
}

.ep12-quick-action-label {
  font-size: 0.625rem;    /* 10px caption */
  font-weight: 500;
  color: #1F2937;
  text-align: center;
  line-height: 1.3;
}

/* ===========================================================
     11. LIVE MATCHING — PREMIUM NATIVE COMPACT CARDS
     Sprint 12.12.7D: 18px radius, soft shadows, 80px image
     5 cards visible on mobile, context-aware info, native marketplace
    =========================================================== */

.ep12-live-matching {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.ep12-live-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ep12-live-indicator {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.ep12-live-indicator .ep12-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16A34A;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
  animation: xg-pulse 1.5s ease-in-out infinite;
}

.ep12-live-indicator .ep12-live-label {
  font-size: 0.75rem;     /* 12px caption */
  font-weight: 700;
  color: #16A34A;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ep12-live-title {
  font-size: 1.375rem;    /* 22px section heading */
  font-weight: 700;
  color: #1F2937;
  margin: 0;
}

.ep12-live-counter {
  color: #1F4E8C;
  font-weight: 800;
  transition: all 200ms ease;
}

/* LIVE Feed Container — reduced gaps for density */
.ep12-live-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════
    LIVE CARD — Premium Native Compact
    Sprint 12.12.7C specs:
    — 18px border-radius
    — Soft shadow, large blur, low opacity
    — 16:9 image at 95-110px
    — No heavy borders
    — Compact 8px grid padding
    — At least 4 cards visible on normal Android screen
   ═══════════════════════════════════════════════════════ */

.ep12-live-card {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #E7EEF7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.ep12-live-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.ep12-live-card:active {
  transform: scale(0.98);
  transition: transform 150ms ease;
}

.ep12-live-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

/* Vehicle Image — 16:9, 80px target (Sprint 12.12.7D: reduced 25%) */
.ep12-live-media {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
  background: linear-gradient(135deg, #F3F6FA 0%, #EDF2F8 50%, #E7EEF7 100%);
  flex-shrink: 0;
}

.ep12-live-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Vehicle illustration container */
.ep12-live-media-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #EDF2F8 0%, #E7EEF7 50%, #D4DFEC 100%);
  padding: 8px;
  box-sizing: border-box;
}

.ep12-vehicle-illustration {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.10));
  transition: transform 200ms ease;
}

.ep12-live-card:hover .ep12-vehicle-illustration {
  transform: scale(1.05);
}

.ep12-live-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #EDF2F8 0%, #E7EEF7 100%);
}

/* ─── LISTING TYPE BADGE — Sprint 12.12.7D: Compact 26-28px ─── */
.ep12-live-listing-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;     /* 12px */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  line-height: 26px;
}

.ep12-badge-passenger {      /* 🟢 CẦN ĐI XE */
  background: rgba(209, 250, 229, 0.92);
  color: #065F46;
}

.ep12-badge-ride {           /* 🔵 XE GHÉP */
  background: rgba(219, 234, 254, 0.92);
  color: #1E40AF;
}

.ep12-badge-cargo {          /* 🟧 CẦN GỬI HÀNG */
  background: rgba(254, 243, 199, 0.92);
  color: #92400E;
}

.ep12-badge-cargo-offer {    /* 🟦 XE CHỞ HÀNG */
  background: rgba(237, 233, 254, 0.92);
  color: #5B21B6;
}

/* Top Overlay Bar — LIVE + Time */
.ep12-live-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 60%, transparent 100%);
}

.ep12-live-dot-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ep12-live-dot-group .ep12-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
  animation: xg-pulse 1.5s ease-in-out infinite;
}

.ep12-live-dot-group .ep12-live-label {
  font-size: 0.625rem;    /* 10px */
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ep12-live-time {
  font-size: 0.625rem;    /* 10px caption */
  font-weight: 500;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.40);
  padding: 2px 8px;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

/* Card Body — Sprint 12.12.7D: 6px top, compressed */
.ep12-live-body {
  padding: 6px 10px 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

/* ─── ROUTE — Sprint 12.12.7D: 20px, Bold 700, Primary ─── */
.ep12-live-route {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.25rem;    /* 20px */
  font-weight: 700;
  color: #1F2937;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.ep12-live-route-origin,
.ep12-live-route-dest {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44%;
}

.ep12-live-route-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #1F4E8C;
  margin: 0 2px;
}

/* ─── SCHEDULE ROW ─── */
.ep12-live-schedule {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1px;
}

.ep12-live-schedule-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.6875rem;   /* 11px */
  font-weight: 500;
  color: #64748B;
  white-space: nowrap;
}

.ep12-live-schedule-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #9CA3AF;
}

.ep12-live-duration {
  color: #1F4E8C;
  font-weight: 600;
}

/* ─── VEHICLE ROW — Third priority (legacy) ─── */
.ep12-live-vehicle-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── CONTEXT-AWARE INFO LINE — Sprint 12.12.7D: 14-15px, Medium ─── */
.ep12-live-info-line {
  font-size: 0.875rem;    /* 14px */
  font-weight: 500;
  color: #4B5563;
  line-height: 1.3;
  margin: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep12-live-info-passenger { color: #059669; }
.ep12-live-info-ride { color: #1E40AF; }
.ep12-live-info-cargo { color: #B45309; }
.ep12-live-info-cargo-offer { color: #6D28D9; }
.ep12-live-info-default { color: #64748B; }

.ep12-live-vehicle {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep12-live-capacity {
  color: #16A34A;
  font-weight: 600;
}

.ep12-live-detail-sep {
  color: #D4DFEC;
}

/* ─── PRICE — Accent, Bold (Fourth priority) ─── */
.ep12-live-price {
  margin: 2px 0 1px;
  line-height: 1.2;
}

.ep12-live-price-value {
  font-size: 1.25rem;      /* 20px */
  font-weight: 700;
  color: #1F4E8C;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* ─── DRIVER ROW — Last priority ─── */
.ep12-live-driver {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.ep12-live-avatar-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── AVATAR — Sprint 12.12.7D: 36-40px, white border, soft shadow ─── */
.ep12-driver-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.03);
  transition: transform 150ms ease;
}

.ep12-driver-avatar-default {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
}

.ep12-live-card:hover .ep12-driver-avatar-img {
  transform: scale(1.04);
}

.ep12-live-driver-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.ep12-live-driver-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep12-live-driver-rating {
  display: flex;
  align-items: center;
  gap: 3px;
}

.ep12-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.ep12-rating-stars svg {
  width: 12px;
  height: 12px;
}

.ep12-live-rating-value {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #1F2937;
}

.ep12-live-rating-count {
  font-size: 0.625rem;
  color: #9CA3AF;
}

/* ─── VERIFIED BADGE ─── */
.ep12-live-verified {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #E8F5F0;
  color: #0A5828;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ep12-live-verified svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* ─── TRIP STATUS BADGE ─── */
.ep12-trip-status-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.5625rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.ep12-trip-status-active { display: none; }
.ep12-trip-status-completed { background: rgba(22, 163, 74, 0.85); color: #fff; }
.ep12-trip-status-expired { background: rgba(100, 116, 139, 0.85); color: #fff; }
.ep12-trip-status-cancelled { background: rgba(239, 68, 68, 0.85); color: #fff; }
.ep12-trip-status-full { background: rgba(217, 119, 6, 0.85); color: #fff; }

/* ═══════════════════════════════════════════════════════
    CARD ACTION BAR — Premium Native
    Outline: Sky Blue border, white bg ("Chi tiết")
    Primary: Soft Blue Gradient ("Ghép ngay")
    Equal height, 42px, 12px radius
   ═══════════════════════════════════════════════════════ */

.ep12-live-actions {
  display: flex;
  gap: 6px;
  padding: 6px 10px 8px;
  border-top: 1px solid #E7EEF7;
}

.ep12-live-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 42px;
  height: 42px;
  text-decoration: none;
  transition: all 150ms ease;
  border: none;
  white-space: nowrap;
}

/* Outline — Sky Blue Border, White Background */
.ep12-live-btn-outline {
  background: #FFFFFF;
  color: #67B7FF;
  border: 1.5px solid #67B7FF;
}

.ep12-live-btn-outline:hover {
  background: #EAF4FF;
  border-color: #4da8ff;
  color: #338ce6;
}

.ep12-live-btn-outline:active {
  transform: scale(0.98);
  background: #D0E9FF;
  border-color: #1a70cc;
}

/* Primary — Soft Blue Gradient */
.ep12-live-btn-primary {
  background: linear-gradient(135deg, #2F80ED 0%, #1F4E8C 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(31, 78, 140, 0.18);
}

.ep12-live-btn-primary:hover {
  background: linear-gradient(135deg, #5395e9 0%, #2D63B3 100%);
  box-shadow: 0 4px 14px rgba(31, 78, 140, 0.28);
}

.ep12-live-btn-primary:active {
  background: linear-gradient(135deg, #1F4E8C 0%, #15355F 100%);
  transform: scale(0.98);
}

/* Card enter animation */
.ep12-live-card.entering {
  animation: xg-live-card-enter 300ms ease both;
}

@keyframes xg-live-card-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* LIVE pulse animation */
@keyframes xg-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
  50%      { opacity: 0.4; box-shadow: 0 0 2px rgba(74, 222, 128, 0.2); }
}

/* ─── SKELETON LOADING — Blue-tone shimmer ─── */

.ep12-skeleton-card {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #E7EEF7;
  overflow: hidden;
}

.ep12-skeleton-card .ep12-live-media {
  background: linear-gradient(135deg, #EDF2F8 0%, #E7EEF7 100%);
  position: relative;
}

.ep12-skeleton-card .ep12-live-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(47, 128, 237, 0.10), transparent);
  animation: xg-shimmer 1.5s ease-in-out infinite;
}

.ep12-skeleton-card .ep12-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: #E7EEF7;
  margin: 4px 10px;
  position: relative;
  overflow: hidden;
}

.ep12-skeleton-card .ep12-skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(47, 128, 237, 0.10), transparent);
  animation: xg-shimmer 1.5s ease-in-out infinite;
}

.ep12-skeleton-card .ep12-skeleton-line:first-child {
  width: 60%;
}

.ep12-skeleton-card .ep12-skeleton-line:last-child {
  width: 40%;
}

@keyframes xg-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── EMPTY STATE ─── */

.ep12-live-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px dashed #E7EEF7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
}

.ep12-live-empty-icon {
  font-size: 4rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.ep12-live-empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 8px;
}

.ep12-live-empty-text {
  font-size: 0.875rem;
  color: #64748B;
  max-width: 300px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.ep12-live-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2F80ED 0%, #1F4E8C 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  height: 48px;
  transition: background 150ms ease;
}

.ep12-live-empty-btn:hover {
  background: linear-gradient(135deg, #5395e9 0%, #2D63B3 100%);
}

/* ═══════════════════════════════════════════════════════
     12. BOTTOM NAVIGATION — Fixed 5-item bar
    ═══════════════════════════════════════════════════════ */

.ep12-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #FFFFFF;
  border-top: 1px solid #E7EEF7;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.04), 0 -1px 4px rgba(0, 0, 0, 0.03);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.ep12-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  text-decoration: none;
  color: #64748B;
  transition: color 150ms ease;
  position: relative;
  touch-action: manipulation;
  min-height: 48px;
}

.ep12-nav-item:hover {
  color: #1F2937;
}

.ep12-nav-item.active {
  color: #1F4E8C;
}

.ep12-nav-item:focus-visible {
  outline: 2px solid #1F4E8C;
  outline-offset: -2px;
}

.ep12-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.ep12-nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ep12-nav-label {
  font-size: 0.625rem;    /* 10px caption */
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* Create Button (Raised center) */
.ep12-nav-create-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2F80ED 0%, #1F4E8C 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(31, 78, 140, 0.25);
  position: relative;
  top: -8px;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.ep12-nav-create:hover .ep12-nav-create-circle {
  box-shadow: 0 6px 24px rgba(31, 78, 140, 0.35);
  transform: scale(1.08);
}

.ep12-nav-create:active .ep12-nav-create-circle {
  transform: scale(0.95);
}

/* Notification Badge */
.ep12-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #EF4444;
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid #FFFFFF;
}

/* ===========================================================
     13. SNACKBAR
    =========================================================== */

.xos-snackbar {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: #1F2937;
  color: #EDF2F8;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  z-index: 1100;
  max-width: calc(100vw - 32px);
  text-align: center;
  transition: transform 300ms cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xos-snackbar.active {
  transform: translateX(-50%) translateY(0);
}

/* ===========================================================
     14. HORIZONTAL SCROLL PREVENTION
    =========================================================== */

/* Sprint 12.27 HOTFIX: Đổi overflow-x: hidden → clip để dropdown tuyệt đối
   không bị cắt xén bởi scroll container của html/body.
   overflow: clip giống hidden nhưng không tạo scroll container,
   cho phép dropdown absolute (z-index: 999999) vượt ra ngoài. */
html, body {
  max-width: 100vw;
  overflow-x: clip;
}

/* Fallback cho browser cũ không hỗ trợ overflow: clip — vẫn giữ hidden
   nhưng chỉ áp dụng khi không có dropdown active */
@supports not (overflow-x: clip) {
  html, body {
    overflow-x: hidden;
  }
}

.ep12-home {
  max-width: 100vw;
}

.ep12-home *,
.ep12-hero-search *,
.ep12-search-fields *,
.ep12-search-autocomplete-wrap * {
  max-width: 100%;
}

.ep12-map-overlay {
  max-width: 100vw;
  overflow: hidden;
}

.ep12-autocomplete-dropdown,
.ep12-map-ac-dropdown {
  max-width: 100%;
}

/* Sprint 12.22G.3D & 12.27: Allow autocomplete dropdown to overflow visible */
.ep12-search-field-origin,
.ep12-search-field-dest {
  min-width: 0;
  overflow: visible !important;
}

/* Sprint 12.27: Ensure ALL ancestor containers allow dropdown overflow */
.ep12-hero-search,
.ep12-hero-search-inner,
.ep12-search-fields,
.ep12-search-field,
.ep12-search-autocomplete-wrap,
.ep12-container {
  overflow: visible !important;
}

/* Sprint 12.27: Ensure positioning context for absolute dropdown */
.ep12-search-autocomplete-wrap {
  position: relative !important;
}

/* SPRINT 12.28: Dropdown is now portal-mounted on <body>.
   .ep12-home ancestor selectors no longer affect it.
   Keep only the wrap override for the input wrapper context. */
.ep12-home .ep12-search-autocomplete-wrap {
  max-width: none !important;
}

/* ===========================================================
     15. RESPONSIVE — 320px (Tiny phones)
    =========================================================== */

@media (max-width: 359px) {
  .ep12-search-fields {
    flex-direction: column;
  }

  .ep12-search-field {
    flex: 1 1 auto;
    min-width: 100%;
  }

  .ep12-search-field-origin,
  .ep12-search-field-dest {
    flex: 1 1 auto;
  }

  .ep12-intent-card {
    min-height: 48px;
    padding: 2px;
  }

  .ep12-intent-label {
    font-size: 0.5625rem;
  }

  .ep12-intent-icon {
    font-size: 16px;
  }

  .ep12-search-actions {
    flex-direction: column;
  }

  .ep12-search-btn {
    width: 100%;
  }

  .ep12-quick-actions {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .ep12-quick-action-icon {
    width: 36px;
    height: 36px;
  }

  .ep12-quick-action-icon svg {
    width: 18px;
    height: 18px;
  }

  .ep12-listings-grid {
    grid-template-columns: 1fr;
  }

  .ep12-hero-search-inner {
    padding: 4px;
  }

  .ep12-live-feed {
    gap: 6px;
  }

  .ep12-live-media {
    height: 75px;
  }

  .ep12-live-route {
    font-size: 0.875rem;
  }

  .ep12-live-price-value {
    font-size: 1.125rem;
  }

  .ep12-live-btn {
    font-size: 0.6875rem;
    min-height: 38px;
    height: 38px;
  }

  .ep12-live-body {
    padding: 6px 8px 2px;
  }
}

/* ===========================================================
     16. RESPONSIVE — Tablet (≥768px)
    =========================================================== */

@media (min-width: 768px) {
  .ep12-search-fields {
    flex-wrap: nowrap;
  }

  .ep12-intent-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ep12-search-fields {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    gap: 8px;
    align-items: flex-start;
  }

  .ep12-search-field-origin,
  .ep12-search-field-dest {
    flex: 1 1 auto;
  }

  .ep12-search-swap {
    align-self: flex-end;
    margin-bottom: 2px;
  }

  .ep12-quick-actions {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
  }

  /* LIVE feed: 2-column grid */
  .ep12-live-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .ep12-quick-actions {
    display: none;
  }

  .ep12-live-media {
    height: 105px;
  }
}

/* ===========================================================
     17. RESPONSIVE — Desktop (≥1024px)
    =========================================================== */

@media (min-width: 1024px) {
  .ep12-hero-search {
    max-width: 640px;
    margin: 0 auto;
  }

  .ep12-hero-search-inner {
    padding: 12px;
  }

  .ep12-intent-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* LIVE feed: 3-column grid */
  .ep12-live-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .ep12-live-media {
    height: 110px;
  }

  /* Bottom nav: centered, rounded top */
  .ep12-bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 18px 18px 0 0;
  }
}

/* ===========================================================
     18. ACCESSIBILITY — Reduced Motion
    =========================================================== */

@media (prefers-reduced-motion: reduce) {
  .ep12-card,
  .ep12-card-link,
  .ep12-search-btn,
  .ep12-quick-action,
  .ep12-intent-card,
  .ep12-live-card,
  .ep12-live-card.entering,
  .ep12-map-overlay,
  .ep12-autocomplete-dropdown,
  .ep12-live-btn {
    transition: none;
    animation: none;
    transform: none;
  }

  .ep12-live-dot,
  .ep12-live-dot-group .ep12-live-dot,
  .ep12-live-indicator .ep12-live-dot {
    animation: none;
  }
}

/* ===========================================================
     19. HIGH CONTRAST
    =========================================================== */

@media (prefers-contrast: high) {
  .ep12-section-title {
    color: #000000;
  }

  .ep12-search-input {
    border-width: 2px;
  }

  .ep12-live-card,
  .ep12-intent-card {
    border-width: 2px;
  }

  .ep12-bottom-nav {
    border-top-width: 2px;
  }

  .ep12-intent-card.active {
    border: 3px solid #1F4E8C;
  }

  .ep12-hero-search {
    border: 1px solid rgba(0,0,0,0.15);
  }

  .ep12-live-btn-outline {
    border-width: 2px;
  }
}

/* ===========================================================
     20. MODULAR HOMEPAGE SECTIONS (Phase 5)
    =========================================================== */

.ep12-hp-module {
  padding: 12px 0;
}

.ep12-hp-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.ep12-hp-module-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1F2937;
}

.ep12-hp-module-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.ep12-hp-module-link {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #2F80ED;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ep12-hp-module-link:hover {
  color: #1F4E8C;
  text-decoration: underline;
}

/* Horizontal scroll for modules */
.ep12-hp-module-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 4px 4px;
}

.ep12-hp-module-scroll::-webkit-scrollbar {
  display: none;
}

.ep12-hp-module-scroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
  min-width: 200px;
  max-width: 280px;
}

/* Promo card */
.ep12-promo-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #2F80ED 0%, #1F4E8C 100%);
  border-radius: 18px;
  color: #ffffff;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.ep12-promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(31, 78, 140, 0.30);
}

.ep12-promo-emoji {
  font-size: 2rem;
  line-height: 1;
}

.ep12-promo-text {
  flex: 1;
  min-width: 0;
}

.ep12-promo-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}