/* ==========================================================================
   FreeP - Luxury Travel & Transit UI (Inspired by High-Speed Rail Mockup)
   Clean, modern, premium aesthetic with soft pearl surfaces & black pill buttons
   ========================================================================== */

:root {
    --bg-page: #f2f4f8;
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --bg-input: #f8fafc;
    --bg-subtle: #f1f4f9;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-light: #6b7280;

    --color-dark: #111827;
    --color-dark-hover: #1f2937;
    
    /* Warm & Luxury Accents */
    --accent-gold-bg: #fef3c7;
    --accent-gold-text: #92400e;
    --accent-gold-border: #fde68a;

    --accent-green-bg: #ecfdf5;
    --accent-green-text: #065f46;
    --accent-green-border: #a7f3d0;

    --accent-blue-bg: #eff6ff;
    --accent-blue-text: #1e40af;
    --accent-blue-border: #bfdbfe;

    --accent-red-bg: #fef2f2;
    --accent-red-text: #991b1b;
    --accent-red-border: #fecaca;

    --border-card: rgba(0, 0, 0, 0.06);
    --border-light: #e5e7eb;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-button: 0 4px 14px rgba(17, 24, 39, 0.2);

    --radius-pill: 9999px;
    --radius-card: 24px;
    --radius-inner: 16px;
    --radius-sm: 10px;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-page);
    background-image: radial-gradient(at 10% 10%, rgba(254, 243, 199, 0.35) 0px, transparent 40%),
                      radial-gradient(at 90% 20%, rgba(219, 234, 254, 0.4) 0px, transparent 40%),
                      radial-gradient(at 50% 90%, rgba(209, 250, 229, 0.3) 0px, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* App Container (Focused luxury mobile-first layout) */
.app-screen-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 80px 16px;
}

/* ==========================================================================
   Header & Greeting
   ========================================================================== */

.app-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.user-greeting-box {
    display: flex;
    flex-direction: column;
}

.greeting-subtitle {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: -0.2px;
}

.greeting-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.6px;
    line-height: 1.2;
}

.greeting-title .brand-subtext {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.88em;
}

.header-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bilingual Language Switch Pill */
.lang-switch-pill {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

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

.lang-btn.active {
    background: var(--color-dark);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.25);
}

/* Savings Pill */
.savings-pill {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    user-select: none;
}

.savings-pill:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.savings-pill.bump {
    transform: scale(1.1);
}

.savings-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.savings-amount {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: #059669;
}

.savings-plus {
    background: #ecfdf5;
    color: #059669;
    font-size: 12px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Website Highlighter / Hero Mission Card
   ========================================================================== */

.hero-highlighter-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.hero-highlighter-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #f59e0b 100%);
}

.hero-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-badge-tag .sparkle-icon {
    font-size: 12px;
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin-bottom: 10px;
}

.hero-description {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.hero-description strong {
    color: var(--text-primary);
    font-weight: 700;
}

.hero-perks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-perk-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.hero-perk-item .perk-icon {
    font-size: 13px;
}

/* ==========================================================================
   Station Search Card (Inspired by Middle Phone Form)
   ========================================================================== */

.station-search-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 22px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    position: relative;
}

.search-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.live-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-beacon {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: beaconPulse 2s infinite;
}

@keyframes beaconPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-beacon-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}

.search-input-container {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-inner);
    padding: 6px 14px;
    transition: var(--transition);
}

.search-input-container:focus-within {
    border-color: var(--color-dark);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
    background: #ffffff;
}

.input-icon-wrap {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    margin-right: 10px;
}

.pin-svg {
    width: 20px;
    height: 20px;
}

.input-text-wrap {
    flex: 1;
}

.input-text-wrap input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 0;
}

.input-text-wrap input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.clear-search-btn {
    background: #e5e7eb;
    border: none;
    color: #4b5563;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    margin-right: 8px;
    transition: var(--transition);
}

.clear-search-btn:hover {
    background: #cbd5e1;
}

.icon-refresh-btn {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

.icon-refresh-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--color-dark);
}

.icon-refresh-btn.spinning .refresh-svg {
    animation: spin 0.8s linear infinite;
}

.refresh-svg {
    width: 16px;
    height: 16px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Autocomplete Floating Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-inner);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: var(--transition);
}

.autocomplete-item:hover {
    background: #f8fafc;
}

.st-item-icon {
    font-size: 16px;
}

.st-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.station-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14.5px;
}

.station-item-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

/* Preset Chips Scroll */
.preset-chips-scroll {
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.preset-chips-scroll::-webkit-scrollbar {
    display: none;
}

.preset-chips {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.chip {
    background: var(--bg-subtle);
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.chip.active {
    background: var(--color-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}

/* ==========================================================================
   Station Meta Strip & Auto-Sync
   ========================================================================== */

.station-meta-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    margin-bottom: 14px;
}

.active-station-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.active-station-info h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.station-code-pill {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.auto-sync-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
}

.auto-sync-checkbox input {
    accent-color: var(--color-dark);
    cursor: pointer;
}

/* ==========================================================================
   Category Filter Navigation (Styled like top tabs in Mockup)
   ========================================================================== */

.category-filter-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 18px;
    scrollbar-width: none;
}

.category-filter-nav::-webkit-scrollbar {
    display: none;
}

.category-pill {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.category-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.category-pill.active {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #ffffff;
    box-shadow: var(--shadow-button);
}

.pill-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
}

.category-pill.active .pill-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.pill-badge.badge-green {
    background: #dcfce7;
    color: #166534;
}

.pill-badge.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.pill-badge.badge-gold {
    background: #fef3c7;
    color: #92400e;
}

/* ==========================================================================
   Luxury Train Ticket Card (Exact Recreation of Right Phone in Mockup)
   ========================================================================== */

.train-ticket-stream {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.luxury-train-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.luxury-train-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.luxury-train-card.card-at-platform {
    border: 1.5px solid #10b981;
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* 1. Ticket Header Row (Operator & Class Pill) */
.ticket-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.train-operator-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.operator-badge-icon {
    font-size: 20px;
    line-height: 1;
}

.operator-title-col {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.operator-line-type {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: #b45309; /* Warm gold/amber logo text like in mockup */
    letter-spacing: -0.2px;
}

.operator-model-num {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-light);
}

.ticket-header-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.delay-pill {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.luxury-class-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

.luxury-class-pill.pill-gold {
    background: var(--accent-gold-bg);
    color: var(--accent-gold-text);
    border: 1px solid var(--accent-gold-border);
}

.luxury-class-pill.pill-green {
    background: var(--accent-green-bg);
    color: var(--accent-green-text);
    border: 1px solid var(--accent-green-border);
}

.luxury-class-pill.pill-red {
    background: var(--accent-red-bg);
    color: var(--accent-red-text);
    border: 1px solid var(--accent-red-border);
}

/* 2. Route & Dotted Timeline (Core Mockup Visual) */
.ticket-route-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.route-endpoint {
    display: flex;
    flex-direction: column;
}

.route-endpoint.destination {
    align-items: flex-end;
    text-align: right;
}

.endpoint-code {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.endpoint-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Center Dotted Graphic */
.route-center-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 160px;
}

.route-center-top {
    min-height: 22px;
    display: flex;
    align-items: center;
}

.timeline-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.timeline-badge.timeline-active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pulse-green {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: beaconPulse 1.8s infinite;
}

.timeline-badge.timeline-dwell {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.timeline-badge.timeline-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.timeline-badge.timeline-origin {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.timeline-badge.timeline-depot {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dashed-rail-track {
    display: flex;
    align-items: center;
    width: 100%;
}

.rail-dot {
    width: 4px;
    height: 4px;
    background: #94a3b8;
    border-radius: 50%;
}

.rail-dashes {
    flex: 1;
    height: 2px;
    background-image: linear-gradient(to right, #94a3b8 40%, rgba(255, 255, 255, 0) 0%);
    background-position: top;
    background-size: 7px 2px;
    background-repeat: repeat-x;
}

.rail-train-icon {
    font-size: 14px;
    margin: 0 4px;
    line-height: 1;
}

/* 3. Timings Grid Row */
.ticket-timings-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    background: var(--bg-subtle);
    border-radius: var(--radius-inner);
    padding: 12px 16px;
    margin-bottom: 18px;
    align-items: center;
}

.timing-col {
    display: flex;
    flex-direction: column;
}

.timing-col.center {
    align-items: center;
    text-align: center;
}

.timing-col.right {
    align-items: flex-end;
    text-align: right;
}

.timing-sublabel {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.timing-time-val {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.timing-dwell-val {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: #1e40af;
}

.timing-dwell-val.dwell-ticking {
    color: #059669;
    font-size: 16px;
}

.timing-dwell-val.danger-time {
    color: #dc2626;
}

/* 4. Bottom Action Bar (Price & "Book Now" Button) */
.ticket-bottom-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.ticket-price-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.free-pill {
    background: #ecfdf5;
    color: #065f46;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
}

.price-val-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-val-wrap .currency {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-val-wrap .main-price {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.strikethrough-sanifair {
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 2px;
}

.ticket-buttons-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-details-pill {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    cursor: default;
}

.view-details-pill.danger-pill {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.view-details-pill.origin-wait-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* The Solid Black Pill Button (Direct match to "Book Now") */
.book-now-button {
    background: var(--color-dark);
    color: #ffffff;
    border: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: var(--transition);
}

.book-now-button:hover {
    background: var(--color-dark-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.28);
}

.book-now-button.alarm-armed {
    background: #b45309;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.3);
}

.book-now-button.disabled-btn {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* Advice Footer */
.ticket-advice-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
}

.advice-bullet {
    font-size: 11px;
}

/* ==========================================================================
   Loading & Empty States
   ========================================================================== */

.loading-state, .empty-ticket-state {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-card);
    color: var(--text-secondary);
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--color-dark);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.empty-icon-wrap {
    font-size: 40px;
}

.empty-ticket-state h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.empty-ticket-state p {
    font-size: 13.5px;
    color: var(--text-light);
    max-width: 360px;
}

/* ==========================================================================
   Footer Card (The Golden Rule)
   ========================================================================== */

.app-footer-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-inner);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    box-shadow: var(--shadow-card);
}

.footer-icon-badge {
    font-size: 24px;
    flex-shrink: 0;
}

.footer-text-block strong {
    font-family: var(--font-heading);
    font-size: 13.5px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 1px;
}

.footer-text-block p {
    font-size: 12.5px;
    color: var(--text-light);
}

/* ==========================================================================
   Alarm Toast
   ========================================================================== */

.alarm-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #111827;
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-inner);
    padding: 14px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    opacity: 0;
    transition: var(--transition);
    max-width: 90%;
    width: 440px;
}

.alarm-toast.show {
    display: flex;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.toast-message strong {
    font-size: 13px;
    color: #fde68a;
}

.toast-message span {
    font-size: 12px;
    color: #e5e7eb;
}

.toast-dismiss {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 540px) {
    .app-screen-container {
        padding: 16px 12px 60px 12px;
    }

    .app-top-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-highlighter-card {
        padding: 18px 16px;
    }

    .hero-headline {
        font-size: 19px;
    }

    .hero-description {
        font-size: 13.5px;
    }

    .hero-perks-row {
        gap: 6px;
    }

    .hero-perk-item {
        font-size: 11px;
        padding: 5px 10px;
    }

    .luxury-train-card {
        padding: 18px 16px;
    }

    .endpoint-code {
        font-size: 22px;
    }

    .route-center-graphic {
        width: 120px;
    }

    .ticket-bottom-action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ticket-buttons-wrap {
        justify-content: space-between;
    }

    .book-now-button {
        flex: 1;
        text-align: center;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        bottom: 12px;
        left: 12px;
        right: 12px;
        transform: translateY(150%);
        width: auto;
    }

    .cookie-banner.show {
        transform: translateY(0);
    }
}

/* ==========================================================================
   Legal Footer & Disclaimer
   ========================================================================== */

.legal-footer-container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legal-disclaimer-card {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-inner);
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.legal-disclaimer-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.legal-disclaimer-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-light);
}

.legal-disclaimer-text strong {
    color: var(--text-secondary);
}

.legal-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0;
}

.legal-nav-row .dot-separator {
    color: #cbd5e1;
}

.legal-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.legal-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.legal-link-btn {
    background: transparent;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.legal-link-btn:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* ==========================================================================
   Legal Standalone Document Pages (Impressum & Datenschutz)
   ========================================================================== */

.legal-document-container {
    max-width: 740px;
}

.legal-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

.back-link-btn:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.legal-badge-pill {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.legal-content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 32px 28px;
    box-shadow: var(--shadow-card);
}

.legal-page-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.6px;
    margin-bottom: 6px;
}

.legal-intro-subtitle {
    font-size: 13.5px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.legal-section-block {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.legal-section-block:last-of-type {
    border-bottom: none;
    margin-bottom: 12px;
}

.legal-section-block h2 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.legal-section-block p {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.legal-section-block a {
    color: #0284c7;
    text-decoration: underline;
}

.legal-highlight-box {
    background: #f8fafc;
    border-left: 3px solid #0284c7;
    border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
    padding: 14px 16px;
    margin: 12px 0;
}

.legal-section-block.warning-section .legal-highlight-box,
.legal-section-block.warning-section {
    background: #fffbeb;
    border-radius: var(--radius-inner);
    border: 1px solid #fde68a;
    padding: 16px;
}

.legal-bullet-list {
    margin: 10px 0 10px 20px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.legal-footer-return {
    margin-top: 28px;
    display: flex;
    justify-content: flex-start;
}

.btn-return-primary {
    display: inline-flex;
    align-items: center;
    background: var(--color-dark);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
    transition: var(--transition);
}

.btn-return-primary:hover {
    background: var(--color-dark-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   In-App Modal Dialog
   ========================================================================== */

.legal-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}

.legal-modal-backdrop.open {
    display: flex;
}

.legal-modal-card {
    background: #ffffff;
    border-radius: var(--radius-card);
    max-width: 580px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}

.legal-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close-btn {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: #e5e7eb;
    color: var(--text-primary);
}

.legal-modal-body {
    padding: 22px;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.legal-modal-body strong {
    color: var(--text-primary);
}

.legal-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
}

.modal-footer-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
}

.modal-footer-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Cookie & Privacy Notice Banner
   ========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(160%);
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-inner);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 620px;
    width: 90%;
    z-index: 1500;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cookie-icon {
    font-size: 22px;
}

.cookie-text-box strong {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.cookie-text-box p {
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--text-light);
    margin: 2px 0 0 0;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-link {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-accept-btn {
    background: var(--color-dark);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 7px 14px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-accept-btn:hover {
    background: var(--color-dark-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   User-Friendly Error / Reconnect State
   ========================================================================== */

.error-ticket-state {
    padding: 36px 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.retry-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-dark);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 22px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
    margin-top: 14px;
    transition: var(--transition);
}

.retry-action-btn:hover {
    background: var(--color-dark-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.22);
}

.reconnect-icon-pulse {
    animation: iconSoftPulse 2s infinite ease-in-out;
}

@keyframes iconSoftPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}




/* ==========================================================================
   SEO FAQ Accordion Card
   ========================================================================== */

.seo-faq-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-inner);
    padding: 20px;
    margin-top: 18px;
    box-shadow: var(--shadow-card);
}

.seo-faq-header-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.faq-header-badge {
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.seo-faq-headline {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    transition: var(--transition);
}

.faq-item[open] {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.faq-question {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
    outline: none;
}

.faq-question:hover {
    color: var(--color-brand);
}

.faq-answer {
    font-size: 12.5px;
    line-height: 1.55;
    color: #475569;
    margin-top: 8px;
    margin-bottom: 2px;
}
