@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/**
 * AllOfBD Railway Frontend Stylesheet
 * Brand Theme: Hybrid AllOfBD Royal Blue & Goibibo Travel Tech
 * Typography: 'Inter' (UI, numbers, metrics) + 'Hind Siliguri' (Bengali script)
 * - Primary Royal Blue: #2563EB (AllOfBD brand standard)
 * - Dark Royal Blue: #1D4ED8
 * - Slate Deep (Headings & Frame): #0F172A
 * - Soft Blue Tint: #EFF6FF
 * - Action Orange (High-Conversion CTAs): #F16825 (Goibibo standard)
 * - Action Orange Hover: #D9531E
 * - Status Emerald Green (Availability / Live): #10B981
 * - Notice Tint: #FFFBEB (Border: #F59E0B)
 */

:root {
    /* Modern Bilingual Typography Stack (Inter + Hind Siliguri) */
    --aofbd-font-sans: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --aofbd-font-bengali: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --aofbd-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Brand Colors (AllOfBD Royal Theme) */
    --aofbd-blue-primary: #2563eb;
    --aofbd-blue-dark: #1d4ed8;
    --aofbd-blue-deep: #0f172a;
    --aofbd-blue-light: #eff6ff;
    --aofbd-border-blue: #bfdbfe;

    /* High-Conversion Action CTAs (Goibibo Travel Tech) */
    --aofbd-orange-primary: #f16825;
    --aofbd-orange-dark: #d9531e;
    --aofbd-orange-light: #fff7ed;
    --aofbd-orange-border: #fed7aa;
    --aofbd-orange-shadow: rgba(241, 104, 37, 0.28);

    /* Backwards-compatible aliases for smooth styling transition */
    --aofbd-green-primary: var(--aofbd-blue-primary);
    --aofbd-green-dark: var(--aofbd-blue-dark);
    --aofbd-green-light: var(--aofbd-blue-light);

    /* Status & Alerts */
    --aofbd-status-green: #10b981;
    --aofbd-status-green-dark: #059669;
    --aofbd-status-green-light: #ecfdf5;
    --aofbd-gold: #f59e0b;
    --aofbd-gold-light: #fef8e7;
    --aofbd-notice-bg: #fffbeb;
    --aofbd-notice-border: #f59e0b;
    --aofbd-text-main: #0f172a;
    --aofbd-text-muted: #475569;
    --aofbd-bg-page: #f8fafc;
    --aofbd-bg-card: #ffffff;
    --aofbd-border: #cbd5e1;
    --aofbd-border-subtle: #e2e8f0;
    --aofbd-danger: #dc2626;
    --aofbd-danger-light: #fef2f2;
    --aofbd-radius-sm: 6px;
    --aofbd-radius-md: 10px;
    --aofbd-radius-lg: 16px;
    --aofbd-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --aofbd-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --aofbd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.07);
}

/* Base Wrapper & Universal Typography Isolation */
.aofbd-railway-wrap {
    width: 100%;
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0;
    margin-bottom: 0;
    padding: 24px 24px 64px 24px;
    box-sizing: border-box;
    color: var(--aofbd-text-main);
    font-family: var(--aofbd-font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Breadcrumbs - High Legibility */
.aofbd-breadcrumbs {
    font-size: 0.875rem;
    margin-bottom: 18px;
    color: #475569;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.aofbd-breadcrumbs a {
    color: #2563eb !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.aofbd-breadcrumbs a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.aofbd-breadcrumbs span {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Ensure WordPress theme styles cannot leak in or break typography */
.aofbd-railway-wrap,
.aofbd-railway-wrap *,
.aofbd-railway-wrap *::before,
.aofbd-railway-wrap *::after,
.aofbd-modal,
.aofbd-modal *,
.aofbd-autocomplete-list,
.aofbd-autocomplete-list * {
    font-family: var(--aofbd-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.aofbd-railway-wrap h1,
.aofbd-railway-wrap h2,
.aofbd-railway-wrap h3,
.aofbd-railway-wrap h4,
.aofbd-railway-wrap h5,
.aofbd-railway-wrap h6,
.aofbd-railway-wrap button,
.aofbd-railway-wrap input,
.aofbd-railway-wrap select,
.aofbd-railway-wrap textarea,
.aofbd-railway-wrap optgroup,
.aofbd-modal h2,
.aofbd-modal h3,
.aofbd-modal button,
.aofbd-modal input {
    font-family: var(--aofbd-font-sans) !important;
}

/* Dedicated Bengali Script Styling */
.aofbd-bengali,
[lang="bn"],
.aofbd-train-bn-name,
.aofbd-station-bn,
.aofbd-dest-bn,
.aofbd-orig-bn,
.aofbd-day-bn,
.aofbd-rcc-bn,
.aofbd-stop-bn,
.aofbd-bengali-subtext {
    font-family: var(--aofbd-font-bengali) !important;
    font-weight: 500;
    line-height: 1.55;
}

/* Tabular figures for prices, train numbers, times, and dates */
.aofbd-time-hero,
.aofbd-time-val,
.aofbd-price-amount,
.aofbd-seat-price,
.aofbd-sc-fare,
.aofbd-fare-total,
.aofbd-train-number-badge,
.aofbd-duration-badge,
.aofbd-time-pill,
.aofbd-date-card-num,
.aofbd-tab-num,
.aofbd-badge-count {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
}

/* Hero & Search Hub */
.aofbd-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
    border-radius: var(--aofbd-radius-lg);
    padding: 40px 24px;
    color: #ffffff;
    margin-bottom: 32px;
    box-shadow: var(--aofbd-shadow-md);
    text-align: center;
}

.aofbd-hero-banner h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

.aofbd-hero-banner .aofbd-subtitle {
    font-size: 1.125rem;
    color: #e0e7ff !important;
    -webkit-text-fill-color: #e0e7ff !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25) !important;
    margin: 0 0 24px 0;
}

/* Search Box Container */
.aofbd-search-box {
    background: var(--aofbd-bg-card);
    border-radius: var(--aofbd-radius-md);
    padding: 20px;
    box-shadow: var(--aofbd-shadow-md);
    border: 1px solid var(--aofbd-border);
}

.aofbd-search-grid {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.aofbd-form-group {
    flex: 1 1 150px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.aofbd-form-group-btn {
    flex: 0 0 auto;
}

.aofbd-desktop-only-spacer {
    display: block;
}

.aofbd-form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    margin-bottom: 6px;
    text-align: left;
}

.aofbd-form-group input,
.aofbd-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-sm);
    font-size: 0.95rem;
    color: var(--aofbd-text-main);
    background-color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
}

.aofbd-form-group input:focus,
.aofbd-form-group select:focus {
    border-color: var(--aofbd-green-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 127, 91, 0.15);
}

/* Swap Button */
.aofbd-swap-btn {
    background: #f1f5f9;
    border: 1.5px solid var(--aofbd-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--aofbd-blue-deep);
    cursor: pointer;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.aofbd-swap-btn:hover,
.aofbd-swap-btn:focus {
    background: var(--aofbd-green-light);
    border-color: var(--aofbd-green-primary);
    color: var(--aofbd-green-dark);
    outline: none;
}

.aofbd-btn-search,
.aofbd-btn-search *,
.aofbd-btn-search-hero,
.aofbd-btn-search-hero * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.aofbd-btn-search {
    background: linear-gradient(135deg, var(--aofbd-orange-primary) 0%, var(--aofbd-orange-dark) 100%);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none;
    border-radius: var(--aofbd-radius-sm);
    padding: 11px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--aofbd-orange-shadow);
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aofbd-btn-search:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 4px 14px rgba(241, 104, 37, 0.45);
}

.aofbd-btn-search:active {
    transform: scale(0.98);
}

/* Autocomplete Dropdown - High Visibility */
.aofbd-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: var(--aofbd-radius-sm);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15) !important;
    list-style: none !important;
    padding: 4px 0 !important;
    margin: 4px 0 0 0 !important;
    z-index: 99999 !important;
    max-height: 280px;
    overflow-y: auto;
}

.aofbd-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    transition: background-color 0.12s ease;
}

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

.aofbd-autocomplete-item:hover,
.aofbd-autocomplete-item.active {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 700;
}

.aofbd-autocomplete-code {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 4px;
}

.aofbd-autocomplete-name {
    color: inherit;
    font-weight: 600;
}

/* Phase 1: Goibibo-Style 7-Day Date Carousel */
.aofbd-date-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 8px 12px;
    box-shadow: var(--aofbd-shadow-sm);
}

.aofbd-date-nav-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid var(--aofbd-border);
    color: var(--aofbd-blue-deep);
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aofbd-date-nav-btn:hover:not(.disabled) {
    background: var(--aofbd-green-light);
    color: var(--aofbd-green-dark);
    border-color: var(--aofbd-green-primary);
}

.aofbd-date-nav-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f8fafc;
}

.aofbd-date-strip {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
}

.aofbd-date-card {
    flex: 1 0 110px;
    max-width: 145px;
    padding: 8px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--aofbd-radius-sm);
    background: #ffffff;
    text-decoration: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.aofbd-date-card:hover {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.aofbd-date-card.selected {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px #2563eb !important;
}

.aofbd-date-day {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.aofbd-date-card.selected .aofbd-date-day {
    color: #1d4ed8;
    font-weight: 800;
}

.aofbd-day-bn {
    font-size: 0.75rem;
    font-weight: 600;
}

.aofbd-date-val {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.aofbd-date-card.selected .aofbd-date-val {
    color: #1d4ed8;
}

.aofbd-date-selected-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Actionable Travel Information Notice */
.aofbd-disclaimer-callout {
    background: var(--aofbd-notice-bg);
    border-left: 4px solid var(--aofbd-notice-border);
    border-radius: var(--aofbd-radius-sm);
    padding: 14px 18px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    color: #854d0e;
    line-height: 1.5;
}

.aofbd-disclaimer-callout .aofbd-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.aofbd-notice-link {
    color: var(--aofbd-green-dark);
    font-weight: 700;
    margin-left: 6px;
    text-decoration: none;
}

.aofbd-notice-link:hover {
    text-decoration: underline;
}

/* Popular Routes Section */
.aofbd-popular-routes {
    margin-top: 40px;
}

.aofbd-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 18px 0;
    color: var(--aofbd-blue-deep);
    display: flex;
    align-items: center;
    gap: 8px;
}

.aofbd-routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.aofbd-route-card {
    background: var(--aofbd-bg-card);
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 16px;
    box-shadow: var(--aofbd-shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.aofbd-route-card:hover {
    transform: translateY(-2px);
    border-color: var(--aofbd-green-primary);
    box-shadow: var(--aofbd-shadow-md);
}

.aofbd-route-stations {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    margin-bottom: 6px;
}

.aofbd-route-meta {
    font-size: 0.85rem;
    color: var(--aofbd-text-muted);
}

/* Search Results Page Header & Summary */
.aofbd-results-summary {
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 18px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.aofbd-route-stations-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.aofbd-station-badge-node {
    display: inline-flex;
    flex-direction: column;
}

.aofbd-station-badge-node .aofbd-st-en {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--aofbd-blue-deep);
    line-height: 1.2;
}

.aofbd-station-badge-node .aofbd-st-bn {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--aofbd-text-muted);
}

.aofbd-route-arrow-icon {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--aofbd-green-primary);
}

.aofbd-summary-meta-row {
    font-size: 0.9rem;
    color: var(--aofbd-text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.aofbd-meta-dot {
    color: #cbd5e1;
}

.aofbd-summary-shortcut {
    color: var(--aofbd-green-primary);
    font-weight: 600;
    text-decoration: none;
}

.aofbd-summary-shortcut:hover {
    text-decoration: underline;
}

.aofbd-summary-portal-btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.9rem;
}

/* Sorting Toolbar */
.aofbd-sort-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-sm);
    flex-wrap: wrap;
}

.aofbd-sort-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.aofbd-sort-btn {
    background: #f8fafc;
    border: 1.5px solid var(--aofbd-border);
    color: var(--aofbd-text-main);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
}

.aofbd-sort-btn:hover {
    border-color: var(--aofbd-green-primary);
    color: var(--aofbd-green-dark);
}

.aofbd-sort-btn.active {
    background: var(--aofbd-green-primary);
    color: #ffffff;
    border-color: var(--aofbd-green-primary);
}

/* Journey Option Card */
.aofbd-journey-card {
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    margin-bottom: 24px;
    box-shadow: var(--aofbd-shadow-sm);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aofbd-journey-card:hover {
    border-color: var(--aofbd-green-primary);
    box-shadow: var(--aofbd-shadow-md);
}

.aofbd-journey-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--aofbd-border);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.aofbd-train-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aofbd-train-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.aofbd-train-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.28);
    flex-shrink: 0;
    line-height: 1.2;
}

.aofbd-train-hero-badge .aofbd-hero-hash {
    color: #93c5fd;
    margin-right: 1px;
    font-weight: 700;
}

.aofbd-train-hero-badge.aofbd-hero-sm {
    font-size: 0.8rem;
    padding: 2px 7px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.aofbd-train-pair-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--aofbd-text-muted);
}

.aofbd-ct-leg-train {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aofbd-hub-transfer-badge {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.aofbd-train-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--aofbd-blue-deep);
    text-decoration: none;
}

.aofbd-train-name:hover {
    color: var(--aofbd-green-primary);
}

.aofbd-train-bn-name {
    font-weight: 400;
    color: var(--aofbd-text-muted);
}

.aofbd-train-submeta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.aofbd-train-num-badge {
    background: #f1f5f9;
    color: var(--aofbd-blue-deep);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.aofbd-train-pair {
    font-size: 0.8rem;
    color: var(--aofbd-text-muted);
}

.aofbd-train-type-pill {
    background: var(--aofbd-green-light);
    color: var(--aofbd-green-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Phase 1: Operating Days Matrix */
.aofbd-op-days-matrix {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    padding: 4px 10px;
    border-radius: var(--aofbd-radius-sm);
}

.aofbd-op-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--aofbd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-days-badges {
    display: flex;
    gap: 4px;
}

.aofbd-day-circle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    transition: all 0.15s ease;
    cursor: default;
}

.aofbd-day-circle.runs {
    background: #dcfce7;
    color: #14532d;
    border: 1.5px solid #86efac;
}

.aofbd-day-circle.off {
    background: #f1f5f9;
    color: #475569;
    border: 1px dashed #94a3b8;
    text-decoration: line-through;
    opacity: 1;
}

.aofbd-day-circle.current-day {
    box-shadow: 0 0 0 2.5px #2563eb;
    font-weight: 900;
}

.aofbd-header-status-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aofbd-badge-active {
    background: #dcfce7;
    color: #15803d;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.aofbd-badge-offday {
    background: #fee2e2;
    color: #b91c1c;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid #fecaca;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.aofbd-schedule-tag {
    font-size: 0.75rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.2;
}

/* Card Body Layout - Goibibo Full-Width Tiered Architecture */
.aofbd-journey-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Full-Width Journey Timeline */
.aofbd-timeline-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--aofbd-radius-sm);
    padding: 16px 24px;
    gap: 16px;
}

.aofbd-time-point {
    text-align: left;
    min-width: 120px;
}

.aofbd-time-point.aofbd-time-dest {
    text-align: right;
}

.aofbd-time-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.aofbd-time-point .aofbd-time {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.aofbd-time-point .aofbd-station {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
    margin-top: 4px;
}

.aofbd-duration-bar {
    flex-grow: 1;
    margin: 0 16px;
    text-align: center;
    position: relative;
}

.aofbd-duration-text {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.aofbd-duration-text strong {
    color: #0f172a;
    font-weight: 800;
}

.aofbd-duration-prefix {
    font-weight: 600;
}

.aofbd-duration-line {
    height: 2.5px;
    background: #94a3b8;
    position: relative;
    display: block;
    margin: 6px 0;
}

.aofbd-duration-line::before,
.aofbd-duration-line::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--aofbd-green-primary);
}

.aofbd-duration-line::before {
    left: 0;
}

.aofbd-duration-line::after {
    right: 0;
}

.aofbd-overnight-tag {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.aofbd-stops-action {
    margin-top: 6px;
}

.aofbd-stops-toggle-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--aofbd-green-primary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.aofbd-stops-toggle-btn:hover {
    background: var(--aofbd-green-light);
    border-color: var(--aofbd-green-primary);
}

/* Phase 1: Goibibo-Style Full-Width Multi-Seat Class Cards Grid */
.aofbd-fares-panel {
    background: #ffffff;
    border-radius: var(--aofbd-radius-sm);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--aofbd-border);
}

.aofbd-fares-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.aofbd-fares-heading {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-fares-tariff-badge {
    background: #e2e8f0;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.aofbd-seat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.aofbd-seat-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--aofbd-radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    min-height: 142px;
}

.aofbd-seat-card:hover {
    background: #ffffff !important;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.aofbd-seat-card.selected {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px #2563eb !important;
}

.aofbd-seat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aofbd-seat-code {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.aofbd-seat-selected-badge {
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 800;
}

.aofbd-seat-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    min-height: 2.6em;
    display: flex;
    align-items: center;
    word-break: normal;
}

.aofbd-seat-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0;
}

.aofbd-seat-vat-note {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 500;
}

.aofbd-seat-book-action {
    background: var(--aofbd-orange-primary);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 4px;
    text-align: center;
    display: block;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    margin-top: 4px;
    box-shadow: 0 2px 6px var(--aofbd-orange-shadow);
}

.aofbd-seat-book-action:hover {
    background: var(--aofbd-orange-dark);
    box-shadow: 0 2px 6px rgba(241, 104, 37, 0.4);
}

.aofbd-fares-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    flex-wrap: wrap;
}

.aofbd-fare-notice {
    font-size: 0.75rem;
    color: var(--aofbd-text-muted);
    line-height: 1.35;
    flex: 1 1 260px;
    margin: 0;
}

.aofbd-fare-notice-empty {
    font-size: 0.85rem;
    color: var(--aofbd-text-muted);
    flex: 1 1 260px;
    margin: 0;
}

/* Booking CTA */
.aofbd-booking-cta {
    background: linear-gradient(135deg, var(--aofbd-orange-primary) 0%, var(--aofbd-orange-dark) 100%);
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--aofbd-radius-sm);
    font-weight: 700;
    font-size: 0.92rem;
    text-align: center;
    display: inline-block;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--aofbd-orange-shadow);
}

.aofbd-booking-cta:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 4px 14px rgba(241, 104, 37, 0.45);
    transform: translateY(-1px);
}

.aofbd-cta-label {
    display: block;
}

.aofbd-cta-sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

.aofbd-panel-main-cta {
    flex-shrink: 0;
}

/* Expandable Intermediate Stops Drawer */
.aofbd-stops-drawer {
    background: #fafbfc;
    border-top: 1px solid var(--aofbd-border);
    padding: 16px 20px;
}

.aofbd-stops-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--aofbd-blue-deep);
    margin-bottom: 12px;
}

.aofbd-drawer-train-ref {
    color: var(--aofbd-text-muted);
    font-weight: 500;
}

.aofbd-stops-table-wrap {
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-sm);
    overflow-x: auto;
}

.aofbd-stops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.aofbd-stops-table th {
    background: #f8fafc;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    border-bottom: 1px solid var(--aofbd-border);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-stops-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.aofbd-stops-table tr:last-child td {
    border-bottom: none;
}

.aofbd-stops-table tr:hover {
    background: #f8fafc;
}

.aofbd-col-seq {
    color: var(--aofbd-text-muted);
    width: 36px;
}

.aofbd-stop-bn {
    color: var(--aofbd-text-muted);
    font-weight: 400;
    font-size: 0.82rem;
    margin-left: 4px;
}

.aofbd-stops-empty {
    font-size: 0.85rem;
    color: var(--aofbd-text-muted);
    margin: 0;
}

/* Card Footnote */
.aofbd-journey-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 8px 20px;
    font-size: 0.75rem;
    color: var(--aofbd-text-muted);
}

/* Empty State */
.aofbd-empty-results {
    padding: 48px 24px;
    text-align: center;
}

.aofbd-empty-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    margin: 0 0 12px 0;
}

.aofbd-empty-desc {
    font-size: 0.95rem;
    color: var(--aofbd-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Comprehensive Smartphone & Tablet Responsiveness Suite (320px - 768px)
   ========================================================================== */
.aofbd-railway-wrap *,
.aofbd-railway-wrap *::before,
.aofbd-railway-wrap *::after {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    /* Layout & Container Tuning */
    .aofbd-railway-wrap {
        max-width: 100% !important;
        overflow-x: hidden;
        padding: 14px 12px 48px 12px;
    }

    .aofbd-desktop-only-spacer {
        display: none;
    }

    /* Headings & Typography */
    .aofbd-railway-wrap h1 {
        font-size: 1.45rem !important;
        line-height: 1.25 !important;
    }

    .aofbd-railway-wrap h2 {
        font-size: 1.15rem !important;
        line-height: 1.3 !important;
    }

    /* Hero Banner Mobile */
    .aofbd-hero-banner {
        padding: 24px 16px;
        margin-bottom: 20px;
        border-radius: var(--aofbd-radius-md);
    }

    .aofbd-hero-banner h1 {
        font-size: 1.6rem !important;
        margin-bottom: 6px;
    }

    .aofbd-hero-banner .aofbd-subtitle {
        font-size: 0.92rem;
        margin-bottom: 16px;
    }

    /* Input & Select 16px Minimum (Prevents iOS Safari auto-zoom) */
    .aofbd-railway-wrap input[type="text"],
    .aofbd-railway-wrap input[type="date"],
    .aofbd-railway-wrap select,
    .aofbd-railway-wrap textarea,
    .aofbd-station-input,
    .aofbd-card-input-hero,
    .aofbd-card-select,
    .aofbd-card-select-sub {
        font-size: 16px !important;
    }

    /* Search Box & Controls */
    .aofbd-search-box {
        padding: 14px;
    }

    .aofbd-form-group {
        flex: 1 1 100%;
    }

    .aofbd-form-group-btn {
        width: 100%;
    }

    .aofbd-btn-search,
    .aofbd-btn-search-hero {
        width: 100%;
        min-height: 46px;
        touch-action: manipulation;
        justify-content: center;
    }

    .aofbd-booking-cta {
        width: 100%;
        text-align: center;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    .aofbd-sms-track-btn {
        width: 100%;
        justify-content: center;
        min-height: 42px;
        touch-action: manipulation;
    }

    /* Journey Option Card */
    .aofbd-journey-card {
        padding: 14px;
        margin-bottom: 16px;
        border-radius: var(--aofbd-radius-md);
    }

    .aofbd-journey-header {
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .aofbd-journey-header > div:first-child {
        width: 100%;
    }

    .aofbd-journey-title {
        font-size: 1.15rem;
    }

    .aofbd-header-status-wrap {
        width: 100%;
        align-items: flex-start;
    }

    .aofbd-op-days-matrix {
        width: 100%;
        justify-content: space-between;
        padding: 6px 10px;
    }

    .aofbd-journey-body {
        padding: 12px;
        gap: 12px;
    }

    /* Sleek Horizontal Journey Timeline (Goibibo/Shohoz Style on Phones) */
    .aofbd-timeline-inline {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        padding: 10px 8px;
        min-width: 0;
        background: #f8fafc;
        border-radius: var(--aofbd-radius-sm);
    }

    .aofbd-time-point {
        flex: 0 0 auto;
        min-width: 66px;
        text-align: left;
    }

    .aofbd-time-point.aofbd-time-dest {
        text-align: right;
    }

    .aofbd-time-point .aofbd-time {
        font-size: 1.25rem;
        line-height: 1.1;
    }

    .aofbd-time-point .aofbd-station {
        font-size: 0.82rem;
        font-weight: 700;
        color: #0f172a;
        max-width: 110px;
        white-space: normal;
        line-height: 1.25;
        word-break: break-word;
        display: block;
    }

    .aofbd-time-point.aofbd-time-dest .aofbd-station {
        text-align: right;
        margin-left: auto;
    }

    .aofbd-duration-bar {
        flex: 1 1 auto;
        margin: 0 4px;
        min-width: 55px;
        max-width: 140px;
        text-align: center;
    }

    .aofbd-duration-text {
        font-size: 0.72rem;
        margin-bottom: 2px;
        gap: 3px;
    }

    .aofbd-duration-line {
        margin: 3px 0;
    }

    .aofbd-stops-action {
        margin-top: 3px;
    }

    .aofbd-stops-toggle-btn {
        font-size: 0.72rem;
        padding: 3px 8px;
        touch-action: manipulation;
    }

    /* Seat Cards Grid on Mobile (Optimal 2-Column Touch Grid) */
    .aofbd-seat-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .aofbd-seat-card {
        padding: 8px 10px;
        border-radius: 6px;
    }

    .aofbd-seat-code {
        font-size: 0.68rem;
        padding: 1px 5px;
    }

    .aofbd-seat-name {
        font-size: 0.78rem;
    }

    .aofbd-seat-price {
        font-size: 1.15rem;
    }

    .aofbd-seat-book-action {
        padding: 6px 8px;
        font-size: 0.74rem;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    .aofbd-fares-panel {
        padding: 12px;
    }

    .aofbd-fares-panel-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .aofbd-panel-main-cta {
        width: 100%;
        text-align: center;
    }

    /* Sticky Summary Ribbon on Mobile */
    .aofbd-sticky-summary-ribbon {
        padding: 10px 12px;
        gap: 8px;
        border-radius: var(--aofbd-radius-sm);
    }

    .aofbd-ssr-content {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .aofbd-ssr-route {
        font-size: 1rem;
        flex-wrap: wrap;
    }

    .aofbd-ssr-meta {
        font-size: 0.78rem;
        gap: 6px;
        width: 100%;
    }

    .aofbd-ssr-actions {
        width: 100%;
    }

    .aofbd-modify-toggle-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        touch-action: manipulation;
    }

    /* Date Carousel on Mobile with Momentum Touch Scroll */
    .aofbd-date-carousel {
        padding: 6px 8px;
        gap: 6px;
    }

    .aofbd-date-nav-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 1.1rem;
    }

    .aofbd-date-strip {
        gap: 6px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .aofbd-date-card {
        flex: 0 0 88px;
        max-width: 96px;
        padding: 6px 8px;
        scroll-snap-align: start;
    }

    .aofbd-date-day {
        font-size: 0.74rem;
    }

    .aofbd-date-val {
        font-size: 0.88rem;
    }

    /* Swipeable Corridor Chips & Search Modes on Mobile */
    .aofbd-qcb-chips,
    .aofbd-search-modes-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .aofbd-qcb-chips::-webkit-scrollbar,
    .aofbd-search-modes-bar::-webkit-scrollbar {
        display: none;
    }

    .aofbd-corridor-chip,
    .aofbd-mode-pill {
        white-space: nowrap;
        flex-shrink: 0;
        touch-action: manipulation;
    }

    /* Toolbar & Sort Bar on Mobile */
    .aofbd-toolbar-wrap {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 14px;
        gap: 10px;
    }

    .aofbd-sort-bar,
    .aofbd-time-filters {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .aofbd-sort-options,
    .aofbd-time-chips {
        flex-wrap: nowrap;
    }

    .aofbd-sort-btn,
    .aofbd-time-chip {
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 38px;
        touch-action: manipulation;
    }

    /* Responsive Tables on Mobile */
    .aofbd-stops-table-wrap {
        -webkit-overflow-scrolling: touch;
        border-radius: var(--aofbd-radius-sm);
    }

    .aofbd-stops-table th,
    .aofbd-stops-table td {
        padding: 8px 10px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    /* Route and Station Index Grids on Mobile */
    .aofbd-routes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .aofbd-route-card {
        padding: 14px;
    }

    /* SMS Modal Dialog on Mobile */
    .aofbd-modal {
        padding: 12px;
    }

    .aofbd-modal-dialog {
        max-width: 100%;
        border-radius: 12px;
    }

    .aofbd-modal-header {
        padding: 14px 16px;
    }

    .aofbd-modal-title {
        font-size: 1.05rem;
    }

    .aofbd-modal-body {
        padding: 14px 16px;
    }

    .aofbd-modal-footer {
        padding: 10px 16px;
    }
}

/* Ultra-Compact Smartphones (e.g. 320px - 360px iPhone SE, Galaxy A-series) */
@media (max-width: 360px) {
    .aofbd-time-point {
        min-width: 58px;
    }

    .aofbd-time-point .aofbd-time {
        font-size: 1.15rem;
    }

    .aofbd-time-point .aofbd-station {
        max-width: 65px;
        font-size: 0.72rem;
    }

    .aofbd-duration-text {
        font-size: 0.68rem;
    }

    .aofbd-seat-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Phase 2: Advance 10-Day Booking Window Status Banner
   ========================================================================== */
.aofbd-booking-window-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-radius: var(--aofbd-radius-md);
    margin-bottom: 20px;
    box-shadow: var(--aofbd-shadow-sm);
    flex-wrap: wrap;
}

.aofbd-booking-window-banner.live {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}

.aofbd-booking-window-banner.upcoming {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    color: #92400e;
}

.aofbd-bw-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.aofbd-bw-badge.live {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.aofbd-bw-badge.upcoming {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.aofbd-bw-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: aofbdPulse 2s infinite;
}

@keyframes aofbdPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.aofbd-bw-content {
    flex: 1 1 300px;
}

.aofbd-bw-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: inherit;
}

.aofbd-bw-desc {
    font-size: 0.825rem;
    opacity: 0.9;
    line-height: 1.4;
}

.aofbd-bw-action {
    flex-shrink: 0;
}

.aofbd-bw-live-btn {
    display: inline-flex;
    align-items: center;
    background: var(--aofbd-orange-primary);
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: var(--aofbd-radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px var(--aofbd-orange-shadow);
}

.aofbd-bw-live-btn:hover {
    background: var(--aofbd-orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(241, 104, 37, 0.4);
}

.aofbd-bw-reminder-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #92400e !important;
    border: 1px solid #d97706;
    padding: 7px 14px;
    border-radius: var(--aofbd-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aofbd-bw-reminder-btn:hover {
    background: #fef3c7;
    border-color: #b45309;
}

/* ==========================================================================
   Phase 2: Toolbar (Sorting Bar + Time-of-Day Quick Filters)
   ========================================================================== */
.aofbd-toolbar-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 12px 18px;
    margin-bottom: 20px;
    box-shadow: var(--aofbd-shadow-sm);
}

.aofbd-sort-bar,
.aofbd-time-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.aofbd-sort-label,
.aofbd-filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
}

.aofbd-sort-options,
.aofbd-time-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.aofbd-sort-btn,
.aofbd-time-chip {
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    color: #0f172a;
    font-size: 0.825rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aofbd-sort-btn:hover,
.aofbd-time-chip:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #2563eb;
}

.aofbd-sort-btn.active,
.aofbd-time-chip.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   Phase 2: Train Card SMS Tracker Action
   ========================================================================== */
.aofbd-sms-track-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--aofbd-blue-deep);
    font-size: 0.775rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.aofbd-sms-track-btn:hover {
    background: #f1f5f9;
    border-color: var(--aofbd-blue-primary);
    color: var(--aofbd-blue-primary);
}

/* ==========================================================================
   Phase 2: 16318 SMS Live Tracking Modal Dialog
   ========================================================================== */
body.aofbd-modal-open {
    overflow: hidden;
}

.aofbd-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.aofbd-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.aofbd-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1;
    animation: aofbdModalZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aofbdModalZoom {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.aofbd-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--aofbd-border);
    background: #f8fafc;
}

.aofbd-modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aofbd-modal-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--aofbd-green-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--aofbd-blue-deep);
    margin: 0;
}

.aofbd-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--aofbd-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease;
}

.aofbd-modal-close:hover {
    color: #0f172a;
}

.aofbd-modal-body {
    padding: 20px 24px;
}

.aofbd-modal-intro {
    font-size: 0.9rem;
    color: var(--aofbd-text-main);
    line-height: 1.5;
    margin: 0 0 18px;
}

.aofbd-sms-box {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .aofbd-sms-box {
        grid-template-columns: 1fr;
    }
}

.aofbd-sms-target-label,
.aofbd-sms-payload-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--aofbd-text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.aofbd-sms-target-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--aofbd-green-primary);
    letter-spacing: 1px;
}

.aofbd-sms-syntax-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aofbd-sms-code {
    font-family: Consolas, Monaco, monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--aofbd-blue-deep);
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #94a3b8;
    letter-spacing: 1px;
}

.aofbd-copy-btn {
    background: var(--aofbd-blue-deep);
    color: #ffffff;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease;
}

.aofbd-copy-btn:hover {
    background: #0d283c;
}

.aofbd-copy-btn.copied {
    background: var(--aofbd-green-primary);
}

.aofbd-sms-mobile-action {
    margin-bottom: 18px;
}

.aofbd-native-sms-btn {
    display: block;
    text-align: center;
    background: var(--aofbd-green-primary);
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
    box-shadow: 0 2px 4px rgba(8, 127, 91, 0.25);
}

.aofbd-native-sms-btn:hover {
    background: var(--aofbd-green-dark);
}

.aofbd-sms-guidelines {
    background: #fafafa;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--aofbd-text-muted);
}

.aofbd-sms-guidelines h4 {
    margin: 0 0 6px;
    font-size: 0.825rem;
    color: var(--aofbd-blue-deep);
}

.aofbd-sms-guidelines ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.5;
}

.aofbd-modal-footer {
    padding: 12px 24px;
    background: #f8fafc;
    border-top: 1px solid var(--aofbd-border);
    display: flex;
    justify-content: flex-end;
}

.aofbd-modal-dismiss-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--aofbd-text-main);
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.aofbd-modal-dismiss-btn:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   Phase 3: Search Hub Utility Navigation Bar
   ========================================================================== */
.aofbd-utility-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.aofbd-utility-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--aofbd-shadow-sm);
    transition: all 0.15s ease;
}

.aofbd-utility-tab:hover {
    border-color: var(--aofbd-green-primary);
    color: var(--aofbd-green-primary);
    transform: translateY(-1px);
    box-shadow: var(--aofbd-shadow-md);
}

.aofbd-utility-tab.active {
    background: var(--aofbd-blue-deep);
    color: #ffffff;
    border-color: var(--aofbd-blue-deep);
}

.aofbd-utab-icon {
    font-size: 1.1rem;
}

/* ==========================================================================
   Phase 3: One-Tap Quick Date Chips
   ========================================================================== */
.aofbd-quick-date-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.aofbd-date-chip {
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.aofbd-date-chip:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #2563eb;
}

.aofbd-date-chip.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

/* ==========================================================================
   Phase 3: High-Demand Corridor Advisory Banner
   ========================================================================== */
.aofbd-demand-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff7ed;
    border: 1.5px solid #fdba74;
    border-radius: var(--aofbd-radius-md);
    padding: 12px 18px;
    margin-bottom: 20px;
    color: #9a3412;
    box-shadow: var(--aofbd-shadow-sm);
}

.aofbd-demand-icon {
    font-size: 1.35rem;
    color: #ea580c;
    flex-shrink: 0;
}

.aofbd-demand-content {
    font-size: 0.85rem;
    line-height: 1.45;
}

.aofbd-demand-content strong {
    font-weight: 700;
    margin-right: 4px;
    color: #7c2d12;
}

/* ==========================================================================
   Phase 3: Modernized Route Corridor Cards
   ========================================================================== */
.aofbd-route-corridor-card {
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 18px 20px;
    box-shadow: var(--aofbd-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.2s ease;
}

.aofbd-route-corridor-card:hover {
    border-color: var(--aofbd-green-primary);
    box-shadow: var(--aofbd-shadow-md);
    transform: translateY(-2px);
}

.aofbd-rcc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.aofbd-rcc-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-top: 2px;
}

.aofbd-rcc-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aofbd-rcc-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--aofbd-blue-deep);
}

.aofbd-rcc-bn {
    font-size: 0.85rem;
    color: var(--aofbd-text-muted);
}

.aofbd-rcc-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--aofbd-text-muted);
}

.aofbd-rcc-stat {
    font-weight: 600;
    color: var(--aofbd-text-main);
}

.aofbd-rcc-badge {
    background: #f1f5f9;
    color: var(--aofbd-blue-deep);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.aofbd-rcc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.aofbd-rcc-search-btn {
    flex: 1;
    text-align: center;
    background: var(--aofbd-orange-primary);
    color: #ffffff !important;
    font-size: 0.825rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: var(--aofbd-radius-sm);
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 4px var(--aofbd-orange-shadow);
}

.aofbd-rcc-search-btn:hover {
    background: var(--aofbd-orange-dark);
}

.aofbd-rcc-guide-btn {
    background: #ffffff;
    color: var(--aofbd-blue-deep) !important;
    border: 1px solid #cbd5e1;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: var(--aofbd-radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.aofbd-rcc-guide-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* ==========================================================================
   Phase 4: Goibibo-Style Segmented Search Card Widget
   ========================================================================== */
.aofbd-search-box-segmented {
    background: #ffffff;
    border-radius: var(--aofbd-radius-lg);
    padding: 20px 24px;
    box-shadow: 0 10px 30px rgba(0, 40, 80, 0.08);
    border: 1px solid #e2e8f0;
}

.aofbd-search-modes-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.aofbd-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    background: #f1f5f9;
    color: var(--aofbd-text-main);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aofbd-mode-pill:hover {
    border-color: var(--aofbd-green-primary);
    color: var(--aofbd-green-dark);
}

.aofbd-mode-pill.active {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.aofbd-mode-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aofbd-green-primary);
    display: inline-block;
}

.aofbd-mode-icon {
    font-size: 0.9rem;
}

.aofbd-mode-bw {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.aofbd-mode-bw:hover {
    background: #fef3c7;
    color: #78350f;
}

.aofbd-segmented-grid {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--aofbd-radius-md);
    position: relative;
    box-shadow: var(--aofbd-shadow-sm);
    flex-wrap: wrap;
}

.aofbd-segmented-grid:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.aofbd-segment-card {
    flex: 1 1 190px;
    padding: 12px 18px;
    border-right: 1px solid #cbd5e1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.aofbd-segment-card:hover {
    background-color: #f8fafc;
}

.aofbd-segment-card:focus-within {
    background-color: #f8fafc;
    box-shadow: inset 0 0 0 2px #2563eb;
}

.aofbd-segment-card:first-child {
    border-top-left-radius: calc(var(--aofbd-radius-md) - 2px);
    border-bottom-left-radius: calc(var(--aofbd-radius-md) - 2px);
}

.aofbd-card-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.aofbd-label-icon {
    font-size: 0.85rem;
}

.aofbd-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aofbd-card-input-hero {
    border: none !important;
    padding: 0 !important;
    min-height: 32px !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    width: 100%;
}

.aofbd-card-input-hero::placeholder {
    color: #94a3b8;
    font-weight: 500;
    font-size: 1rem;
}

.aofbd-card-subtext {
    font-size: 0.78rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.aofbd-swap-container {
    position: relative;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.aofbd-floating-swap {
    position: absolute;
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: #ffffff;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 900;
    transition: all 0.25s ease;
    margin: 0;
}

.aofbd-floating-swap:hover {
    background: #eff6ff;
    border-color: #2563eb;
    transform: rotate(180deg) scale(1.1);
}

.aofbd-card-date-input {
    border: none !important;
    padding: 0 !important;
    min-height: 32px !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
}

.aofbd-class-type-selects {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aofbd-card-select {
    border: none !important;
    padding: 0 20px 0 0 !important;
    min-height: 24px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 2px center !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.aofbd-card-select-sub {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.aofbd-segment-action {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #ffffff;
    border-top-right-radius: calc(var(--aofbd-radius-md) - 2px);
    border-bottom-right-radius: calc(var(--aofbd-radius-md) - 2px);
}

.aofbd-btn-search-hero {
    height: 100%;
    min-height: 56px;
    padding: 0 28px;
    font-size: 1.1rem;
    border-radius: var(--aofbd-radius-sm);
    background: linear-gradient(135deg, var(--aofbd-orange-primary) 0%, var(--aofbd-orange-dark) 100%);
    box-shadow: 0 4px 14px var(--aofbd-orange-shadow);
}

.aofbd-btn-search-hero:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 6px 18px rgba(241, 104, 37, 0.45);
    transform: translateY(-1px);
}

/* Quick Corridor Pills */
.aofbd-quick-corridors-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.aofbd-qcb-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--aofbd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-qcb-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aofbd-corridor-chip {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--aofbd-blue-deep);
    cursor: pointer;
    transition: all 0.15s ease;
}

.aofbd-corridor-chip:hover {
    background: var(--aofbd-green-light);
    border-color: var(--aofbd-green-primary);
    color: var(--aofbd-green-dark);
}

/* ==========================================================================
   Phase 5: Goibibo-Style Sticky Trip Summary Ribbon & Modify Drawer
   ========================================================================== */
.aofbd-sticky-summary-ribbon {
    position: sticky;
    top: 0;
    z-index: 95;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--aofbd-radius-md);
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

body.admin-bar .aofbd-sticky-summary-ribbon {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .aofbd-sticky-summary-ribbon {
        top: 46px;
    }
}

.aofbd-ssr-content {
    flex: 1 1 auto;
    min-width: 0;
}

.aofbd-ssr-grid {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.aofbd-ssr-actions {
    flex-shrink: 0;
    margin-left: auto;
}

.aofbd-ssr-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aofbd-ssr-lbl {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-ssr-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aofbd-ssr-route-val {
    font-size: 1.15rem;
    font-weight: 800;
}

.aofbd-ssr-arrow {
    color: #2563eb;
    font-size: 1.25rem;
    font-weight: 900;
}

.aofbd-ssr-day {
    color: #475569;
    font-weight: 600;
    font-size: 0.88rem;
}

.aofbd-ssr-status-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

.aofbd-modify-toggle-btn {
    background: #ffffff;
    border: 1.5px solid #2563eb;
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: var(--aofbd-radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.aofbd-modify-toggle-btn:hover {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}

.aofbd-modify-drawer {
    animation: aofbdSlideDown 0.25s ease-out;
}

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

/* ==========================================================================
   Phase 5: Goibibo-Style 2-Column Master-Detail Layout & Left Filter Sidebar
   ========================================================================== */
.aofbd-results-2col-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.aofbd-filter-sidebar {
    background: #ffffff;
    border: 1px solid var(--aofbd-border);
    border-radius: var(--aofbd-radius-md);
    padding: 18px;
    box-shadow: var(--aofbd-shadow-sm);
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.aofbd-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.aofbd-sidebar-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--aofbd-blue-deep);
}

.aofbd-reset-filters-btn {
    background: none;
    border: none;
    color: var(--aofbd-green-primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.aofbd-reset-filters-btn:hover {
    color: var(--aofbd-green-dark);
}

.aofbd-filter-group {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f8fafc;
}

.aofbd-filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.aofbd-filter-group-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.aofbd-filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aofbd-filter-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding: 2px 0;
}

.aofbd-filter-check-item:hover {
    color: #2563eb;
}

.aofbd-filter-cb {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.aofbd-filter-cb-box {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #64748b;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: #ffffff;
}

.aofbd-filter-cb:focus + .aofbd-filter-cb-box {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.aofbd-filter-cb:checked + .aofbd-filter-cb-box {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.aofbd-filter-cb:checked + .aofbd-filter-cb-box::after {
    content: '✓';
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
}

.aofbd-filter-cb-label {
    flex-grow: 1;
}

.aofbd-filter-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    margin-left: auto;
    padding-left: 6px;
}

.aofbd-filter-check-item.is-zero {
    opacity: 0.45;
}

/* Mobile Filter Bar & Breakpoints */
.aofbd-mobile-filter-bar {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.aofbd-mobile-filter-trigger {
    background: var(--aofbd-blue-deep);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.aofbd-mf-badge {
    background: var(--aofbd-green-primary);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 10px;
}

@media (max-width: 992px) {
    .aofbd-results-2col-layout {
        grid-template-columns: 1fr;
    }

    .aofbd-filter-sidebar {
        display: none;
    }

    .aofbd-filter-sidebar.mobile-open {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-height: 80vh;
        z-index: 200;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
        animation: aofbdSlideUp 0.25s ease-out;
    }

    .aofbd-mobile-filter-bar {
        display: block;
    }

    .aofbd-segmented-grid {
        flex-direction: column;
    }

    .aofbd-segment-card {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0 !important;
    }

    .aofbd-swap-container {
        width: 100%;
        height: 0;
    }

    .aofbd-floating-swap {
        position: relative;
        margin: -18px auto;
        z-index: 15;
    }

    .aofbd-segment-action {
        border-radius: 0 0 var(--aofbd-radius-md) var(--aofbd-radius-md) !important;
    }

    .aofbd-btn-search-hero {
        width: 100%;
    }
}

@keyframes aofbdSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ==========================================================================
   Connecting Trains & Transfer Routes Styling
   ========================================================================== */
.aofbd-connecting-notice-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    border-radius: var(--aofbd-radius-md, 12px);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.aofbd-cn-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.aofbd-cn-content {
    flex: 1;
}

.aofbd-cn-title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a8a;
}

.aofbd-cn-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.5;
}

.aofbd-connecting-section-header {
    margin: 32px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.aofbd-connecting-section-title {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--aofbd-text-main, #0f172a);
}

.aofbd-connecting-section-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--aofbd-text-muted, #475569);
}

/* Connecting Journey Card */
.aofbd-connecting-journey-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--aofbd-radius-lg, 16px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aofbd-connecting-journey-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
    border-color: #94a3b8;
}

.aofbd-connecting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    padding: 16px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.aofbd-connecting-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.aofbd-connecting-pill {
    display: inline-flex;
    align-items: center;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

.aofbd-transfer-hub-pill {
    display: inline-flex;
    align-items: center;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #bae6fd;
}

.aofbd-runs-today-pill {
    display: inline-flex;
    align-items: center;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #bbf7d0;
}

.aofbd-off-day-pill {
    display: inline-flex;
    align-items: center;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #fecaca;
}

.aofbd-connecting-trains-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    color: var(--aofbd-text-main, #0f172a);
    flex-wrap: wrap;
}

.aofbd-connecting-trains-summary .aofbd-ct-train {
    font-weight: 700;
    color: #1e293b;
}

.aofbd-connecting-trains-summary .aofbd-hub-name {
    font-weight: 600;
    color: #0369a1;
    background: #f0f9ff;
    padding: 2px 8px;
    border-radius: 4px;
}

.aofbd-connecting-metrics {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.aofbd-total-time-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
}

.aofbd-total-time-badge .aofbd-clock-icon {
    font-size: 1.2rem;
}

.aofbd-time-details {
    display: flex;
    flex-direction: column;
}

.aofbd-time-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--aofbd-text-main, #0f172a);
    line-height: 1.2;
}

.aofbd-time-lbl {
    font-size: 0.75rem;
    color: var(--aofbd-text-muted, #475569);
    text-transform: uppercase;
}

.aofbd-total-fare-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: #fff7ed;
    border: 1.5px solid #fdba74;
    border-radius: 8px;
    padding: 6px 14px;
}

.aofbd-fare-from {
    font-size: 0.75rem;
    color: #9a3412;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1;
}

.aofbd-fare-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #c2410c;
    line-height: 1.2;
}

.aofbd-fare-sub {
    font-size: 0.7rem;
    color: #9a3412;
}

/* 2-Leg Journey Breakdown */
.aofbd-connecting-legs-wrap {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aofbd-leg-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.aofbd-leg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.aofbd-leg-step-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.aofbd-step-leg2 {
    background: #f16825;
}

.aofbd-leg-train-link {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--aofbd-text-main, #0f172a);
    text-decoration: none !important;
}

.aofbd-leg-train-link:hover {
    color: #2563eb;
    text-decoration: underline !important;
}

.aofbd-pill-sm {
    font-size: 0.75rem;
    padding: 2px 8px;
}

.aofbd-leg-schedule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.aofbd-leg-time-block {
    min-width: 110px;
}

.aofbd-leg-time {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--aofbd-text-main, #0f172a);
    line-height: 1.2;
}

.aofbd-leg-station {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--aofbd-text-muted, #475569);
}

.aofbd-leg-arrow-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.aofbd-leg-duration {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--aofbd-text-muted, #475569);
    margin-bottom: 4px;
}

.aofbd-leg-track-line {
    width: 100%;
    height: 2px;
    background: #94a3b8;
    position: relative;
}

.aofbd-leg-track-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #94a3b8;
    border-right: 2px solid #94a3b8;
    transform: rotate(45deg);
}

.aofbd-leg-stops-count {
    font-size: 0.75rem;
    color: var(--aofbd-text-muted, #475569);
    margin-top: 4px;
}

.aofbd-leg-action-row {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.aofbd-leg-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none !important;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
    transition: background 0.15s ease, color 0.15s ease;
}

.aofbd-leg-book-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Layover Connector */
.aofbd-layover-connector {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fefce8;
    border: 1.5px dashed #eab308;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 2px 0;
}

.aofbd-layover-icon-box {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.aofbd-layover-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aofbd-layover-info strong {
    font-size: 0.95rem;
    color: #854d0e;
}

.aofbd-layover-hint {
    font-size: 0.8rem;
    color: #713f12;
}

/* Combined Fares Box */
.aofbd-connecting-fares-box {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1.5px solid #e2e8f0;
}

.aofbd-fares-box-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--aofbd-text-main, #0f172a);
    margin-bottom: 12px;
}

.aofbd-connecting-fares-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.aofbd-connecting-seat-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 12px;
}

/* Connecting Footer */
.aofbd-connecting-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.aofbd-connecting-main-ctas {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.aofbd-cta-sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f16825;
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    min-height: 40px;
    transition: background 0.15s ease;
}

.aofbd-cta-sub-btn:hover {
    background: #d9531e;
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .aofbd-connecting-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .aofbd-connecting-metrics {
        width: 100%;
        justify-content: space-between;
    }

    .aofbd-leg-schedule {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .aofbd-leg-time-block {
        width: 100%;
    }

    .aofbd-leg-arrow-block {
        width: 100%;
        align-items: flex-start;
        padding: 4px 0;
    }

    .aofbd-leg-track-line {
        width: 100%;
    }

    .aofbd-connecting-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .aofbd-connecting-main-ctas {
        flex-direction: column;
        width: 100%;
    }

    .aofbd-cta-sub-btn {
        width: 100%;
        min-height: 44px;
    }

    .aofbd-connecting-fares-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Train Card Folding & Accordion Interactions
   ========================================================================== */
.aofbd-journey-card.is-folded {
    margin-bottom: 12px;
}

.aofbd-journey-card.is-folded .aofbd-journey-header {
    border-bottom: none;
    border-radius: var(--aofbd-radius-lg, 16px);
}

.aofbd-journey-card.is-folded:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.aofbd-journey-card .aofbd-journey-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aofbd-journey-card.is-folded .aofbd-journey-header:hover {
    background: #f1f5f9;
}

.aofbd-header-fold-ctrl {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    flex-shrink: 0;
}

.aofbd-fold-glance {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.aofbd-journey-card.is-expanded .aofbd-fold-glance {
    display: none !important;
}

.aofbd-fold-timeline {
    font-weight: 700;
    color: var(--aofbd-text-main, #0f172a);
}

.aofbd-fold-dur {
    font-weight: 600;
    color: var(--aofbd-text-muted, #475569);
    font-size: 0.88rem;
}

.aofbd-fold-fare {
    font-weight: 800;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.9rem;
}

.aofbd-card-fold-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: #ffffff;
    border: 1.5px solid #2563eb;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1d4ed8;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.aofbd-card-fold-toggle:hover {
    border-color: #1d4ed8;
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.aofbd-journey-card.is-expanded .aofbd-card-fold-toggle {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.aofbd-journey-card.is-expanded .aofbd-card-fold-toggle:hover {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}

.aofbd-card-fold-toggle .aofbd-fold-btn-caret {
    font-size: 0.95rem;
    line-height: 1;
    font-weight: 800;
}

.aofbd-card-collapse-content {
    overflow: hidden;
}

@media (max-width: 768px) {
    .aofbd-header-fold-ctrl {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        margin-top: 6px;
        padding-top: 8px;
        border-top: 1px dashed #e2e8f0;
    }

    .aofbd-fold-glance {
        flex-wrap: wrap;
        font-size: 0.88rem;
    }

    .aofbd-card-fold-toggle {
        min-height: 38px;
    }
}

/* ==========================================================================
   Data Provenance & Reliability Block
   ========================================================================== */
.aofbd-provenance-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--aofbd-radius-sm);
    padding: 8px 14px;
}

.aofbd-prov-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #475569;
}

.aofbd-prov-icon {
    font-size: 0.95rem;
}

.aofbd-prov-text strong {
    color: #0f172a;
}

/* ==========================================================================
   Scannable Travel Advisory Notice (3-Column Clean Card)
   ========================================================================== */
.aofbd-scannable-notice {
    background: #fffbeb !important;
    border: 1.5px solid #fde68a !important;
    border-left: 5px solid #f59e0b !important;
    border-radius: var(--aofbd-radius-md) !important;
    padding: 16px 20px !important;
    margin: 18px 0 !important;
}

.aofbd-scannable-notice .aofbd-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.aofbd-scannable-notice .aofbd-notice-title {
    font-size: 1rem;
    font-weight: 800;
    color: #92400e;
    margin: 0;
}

.aofbd-notice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.aofbd-notice-col {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #fef3c7;
    border-radius: var(--aofbd-radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aofbd-nc-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aofbd-notice-col p {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.45;
    margin: 0;
}

@media (max-width: 768px) {
    .aofbd-notice-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Quick Route Comparison Matrix (Overview Table)
   ========================================================================== */
.aofbd-quick-comparison-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--aofbd-radius-md);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.aofbd-qc-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.aofbd-qc-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aofbd-qc-icon {
    font-size: 1.25rem;
}

.aofbd-qc-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.aofbd-qc-subtitle {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
}

.aofbd-qc-table-wrap {
    overflow-x: auto;
}

.aofbd-qc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.aofbd-qc-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1.5px solid #e2e8f0;
    white-space: nowrap;
}

.aofbd-qc-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.aofbd-qc-row {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.aofbd-qc-row:hover {
    background-color: #eff6ff;
}

.aofbd-qc-opt-num {
    font-weight: 800;
    color: #2563eb;
}

.aofbd-qc-tcode {
    background: #1e40af;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.aofbd-qc-hub {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.aofbd-qc-arrow {
    color: #94a3b8;
    font-weight: 700;
    margin: 0 4px;
}

.aofbd-qc-layover-pill {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #fde68a;
    white-space: nowrap;
}

.aofbd-qc-next-badge {
    background: #dc2626;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.aofbd-qc-jump-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.aofbd-qc-jump-btn:hover {
    background: #1d4ed8;
}

/* ==========================================================================
   Overnight Date Rollover & Next-Day Badges
   ========================================================================== */
.aofbd-next-day-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
    margin-left: 6px;
    vertical-align: middle;
}

.aofbd-fold-next-day {
    background: #dc2626;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

.aofbd-leg-time-row {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.aofbd-leg-date,
.aofbd-time-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    margin: 2px 0;
}

.aofbd-continuity-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    margin-left: 8px;
    white-space: nowrap;
}

.aofbd-layover-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.aofbd-bw-microcopy {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    display: block;
    margin-top: 4px;
}

/* Leg Intermediate Stops Toggle Button & Drawer */
.aofbd-leg-stops-btn {
    font-size: 0.75rem !important;
    padding: 2px 10px !important;
    margin-top: 5px;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid #93c5fd !important;
    color: #1d4ed8 !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.aofbd-leg-stops-btn:hover {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    color: #1e40af !important;
}

.aofbd-leg-card .aofbd-stops-drawer {
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    border-radius: var(--aofbd-radius-sm);
    background: #f8fafc;
    overflow: hidden;
    animation: aofbdSlideDown 0.2s ease-out;
}

.aofbd-leg-card .aofbd-stops-drawer-header {
    padding: 10px 14px;
    background: #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #1e293b;
    font-weight: 700;
}

.aofbd-leg-card .aofbd-stops-table th {
    padding: 8px 12px;
    font-size: 0.72rem;
}

.aofbd-leg-card .aofbd-stops-table td {
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* Quick Comparison Matrix Horizontal Scroll Hint */
.aofbd-qc-scroll-hint {
    display: none;
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 14px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

@media (max-width: 768px) {
    .aofbd-qc-scroll-hint {
        display: block;
    }
}

/* Quick Comparison Jump Highlight Animation */
.aofbd-journey-card.aofbd-jump-highlight {
    box-shadow: 0 0 0 3px var(--aob-primary, #007a4d), 0 4px 24px rgba(0, 122, 77, 0.18);
    transition: box-shadow 0.3s ease;
}
@keyframes aofbd-highlight-fade {
    0% { box-shadow: 0 0 0 3px var(--aob-primary, #007a4d), 0 4px 24px rgba(0, 122, 77, 0.18); }
    100% { box-shadow: none; }
}
.aofbd-qc-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.aofbd-qc-row:hover {
    background-color: rgba(0, 122, 77, 0.04);
}

/* Service Type Switcher Tabs (Direct vs Connecting) */
.aofbd-service-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--aofbd-radius-md, 8px);
    border: 1px solid var(--aofbd-border, #e2e8f0);
}
.aofbd-service-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--aofbd-text-muted, #64748b);
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.aofbd-service-tab:hover {
    color: var(--aofbd-text-main, #1e293b);
    background: rgba(255, 255, 255, 0.5);
}
.aofbd-service-tab.active {
    background: #ffffff;
    color: var(--aofbd-green-primary, #007a4d);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.aofbd-stab-icon {
    font-size: 1rem;
}
.aofbd-connecting-section-header {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--aofbd-radius-md, 8px);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.aofbd-connecting-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #166534;
    margin: 0 0 4px 0;
}
.aofbd-connecting-section-subtitle {
    font-size: 0.88rem;
    color: #4b5563;
    margin: 0;
}
@media (max-width: 640px) {
    .aofbd-service-tabs {
        flex-direction: column;
    }
    .aofbd-service-tab {
        justify-content: flex-start;
    }
}
