/* ═══════════════════════════════════════════════════════════════════════════
   Vluchtscanner – Premium Dark Theme
   Glassmorphism + Animated Flight Paths + Aircraft Showcase
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────────────────────────── */

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

:root {
    --bg-primary: #06080f;
    --bg-secondary: #0c1120;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-solid: #0f172a;
    --bg-card-hover: rgba(22, 33, 62, 0.85);
    --bg-input: rgba(10, 16, 30, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border: rgba(56, 73, 107, 0.4);
    --border-light: rgba(99, 120, 168, 0.2);
    --border-focus: #3b82f6;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --accent-glow-strong: rgba(59, 130, 246, 0.25);
    --green: #22c55e;
    --green-soft: #4ade80;
    --green-bg: rgba(34, 197, 94, 0.1);
    --orange: #f59e0b;
    --orange-bg: rgba(245, 158, 11, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.08);
    --purple: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.1);
    --cyan: #06b6d4;
    --cyan-bg: rgba(6, 182, 212, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --glass-blur: blur(20px);
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.04), transparent);
}

/* ── App layout ───────────────────────────────────────────────────────────── */

.app {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-badge.live .status-dot {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px var(--green); }
    50% { box-shadow: 0 0 12px var(--green); }
}

/* ── Search section ───────────────────────────────────────────────────────── */

.main {
    flex: 1;
    padding: 32px 0;
}

.search-section {
    text-align: center;
    margin-bottom: 36px;
}

.search-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 28px;
}

.search-container {
    max-width: 740px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: flex-start;
    background: var(--bg-input);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    gap: 8px;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 0 40px var(--accent-glow);
}

.search-icon {
    padding: 10px 4px 10px 12px;
    font-size: 20px;
    flex-shrink: 0;
}

.search-box textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    padding: 8px 4px;
    resize: none;
    outline: none;
    min-height: 44px;
}

.search-box textarea::placeholder {
    color: var(--text-muted);
}

.search-btn {
    flex-shrink: 0;
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    min-height: 44px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

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

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ── Examples ─────────────────────────────────────────────────────────────── */

.examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.examples-label {
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 0;
    width: 100%;
}

.example-chip {
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: var(--glass-blur);
}

.example-chip:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ── Parsed info ──────────────────────────────────────────────────────────── */

.parsed-info {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.parsed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.parsed-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.parsed-details {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.parsed-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-glow);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    font-size: 13px;
    color: #93c5fd;
}

.parsed-tag .tag-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Results header ───────────────────────────────────────────────────────── */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 20px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.results-count {
    font-weight: 600;
    font-size: 15px;
}

.results-count span { color: var(--accent); }

.results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.results-sort select {
    background: var(--bg-card-solid);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 6px 12px;
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.results-sort select:focus { border-color: var(--accent); }

.results-filters {
    display: flex;
    gap: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-checkbox input { accent-color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   FLIGHT CARDS – Premium glassmorphism met expandable detail panel
   ═══════════════════════════════════════════════════════════════════════════ */

.results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.flight-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.flight-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15), 0 8px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Directe vlucht groene accent lijn */
.flight-card.direct::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--green), var(--cyan));
    border-radius: 3px 0 0 3px;
}

/* Ranking badges */
.rank-badge {
    position: absolute;
    top: 0;
    left: 20px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px 6px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    letter-spacing: 0.3px;
    z-index: 2;
}

.rank-badge.best {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.cheapest-badge {
    position: absolute;
    top: 0;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px 6px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    letter-spacing: 0.3px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.direct-badge-label {
    position: absolute;
    top: 0;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px 6px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    letter-spacing: 0.3px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ── Card Main (altijd zichtbaar) ─────────────────────────────────────────── */

.card-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 22px 24px;
    cursor: pointer;
}

.flight-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* ── Info pills (CO2, afstand, seats) ─────────────────────────────────────── */

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.info-pill.co2 {
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.info-pill.co2.low {
    background: var(--green-bg);
    color: var(--green-soft);
}

.info-pill.co2.mid {
    background: var(--orange-bg);
    color: var(--orange);
    border-color: rgba(245, 158, 11, 0.2);
}

.info-pill.co2.high {
    background: var(--red-bg);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.2);
}

.info-pill.distance {
    background: var(--cyan-bg);
    color: var(--cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.info-pill.urgent {
    background: var(--red-bg);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* ── Flight route (times + path) ──────────────────────────────────────────── */

.flight-route {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flight-endpoint {
    text-align: center;
    min-width: 65px;
}

.flight-endpoint .time {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.flight-endpoint .airport {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.flight-endpoint .date {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

.flight-endpoint.arrival .time {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.overnight-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--orange);
    background: var(--orange-bg);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── Flight path with animated plane ──────────────────────────────────────── */

.flight-path {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 120px;
}

.flight-duration {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.flight-line-container {
    width: 100%;
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
}

.flight-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--border), var(--text-muted), var(--border));
    position: relative;
}

.flight-line::before,
.flight-line::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: -3px;
}

.flight-line::before {
    left: 0;
    background: var(--text-secondary);
    box-shadow: 0 0 6px rgba(148, 163, 184, 0.3);
}

.flight-line::after {
    right: 0;
    background: var(--text-secondary);
    box-shadow: 0 0 6px rgba(148, 163, 184, 0.3);
}

.flight-line.direct {
    background: linear-gradient(90deg, var(--green), var(--cyan), var(--green));
}

.flight-line.direct::before,
.flight-line.direct::after {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

/* Animated plane icon */
.plane-icon {
    position: absolute;
    font-size: 14px;
    top: 50%;
    transform: translateY(-50%);
    animation: fly-across 3s ease-in-out infinite;
    filter: drop-shadow(0 0 4px var(--accent));
    z-index: 1;
}

@keyframes fly-across {
    0% { left: 10%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { left: 85%; opacity: 0; }
}

.plane-icon.has-stops {
    animation: fly-across-stops 4s ease-in-out infinite;
}

@keyframes fly-across-stops {
    0% { left: 5%; opacity: 0; }
    10% { opacity: 1; }
    45% { left: 45%; }
    55% { left: 55%; }
    90% { opacity: 1; }
    100% { left: 90%; opacity: 0; }
}

/* Stop dots */
.stop-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
    top: -2.5px;
    box-shadow: 0 0 6px var(--orange);
    z-index: 2;
}

.stop-dot:nth-child(1) { left: 33%; }
.stop-dot:nth-child(2) { left: 66%; }

.flight-stops {
    font-size: 12px;
    color: var(--text-muted);
}

.flight-stops.direct {
    color: var(--green);
    font-weight: 600;
}

/* ── Flight meta ──────────────────────────────────────────────────────────── */

.flight-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.flight-airline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.airline-code {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 11px;
    padding: 2px 8px;
    background: var(--accent-glow);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-xs);
    letter-spacing: 0.5px;
}

.airline-name { color: var(--text-secondary); }

.meta-sep { color: var(--text-muted); opacity: 0.4; }

.flight-number {
    color: var(--text-muted);
    font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
    font-size: 12px;
}

.ticket-via {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

/* ── Detail badges ────────────────────────────────────────────────────────── */

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.15s;
}

.detail-badge:hover {
    transform: scale(1.05);
}

.detail-badge.baggage {
    background: rgba(59, 130, 246, 0.08);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.detail-badge.baggage.no {
    background: var(--red-bg);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.15);
}

.detail-badge.fare-type {
    background: var(--purple-bg);
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
}

.detail-badge.good {
    background: var(--green-bg);
    color: var(--green-soft);
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.detail-badge.terminal {
    background: var(--orange-bg);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-family: 'SF Mono', monospace;
    font-size: 10px;
}

/* ── Price column ─────────────────────────────────────────────────────────── */

.flight-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 130px;
    gap: 12px;
}

.price-block {
    text-align: right;
}

.flight-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.flight-price .cents {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
}

.price-breakdown {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.price-person {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
}

.book-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
    white-space: nowrap;
}

.book-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXPANDABLE CARD DETAIL PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.card-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.flight-card.expanded .card-expand {
    max-height: 1000px;
}

.expand-content {
    padding: 0 24px 16px;
    border-top: 1px solid var(--border-light);
}

.expand-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    border-top: 1px dashed var(--border-light);
    transition: color 0.2s, background 0.2s;
    user-select: none;
}

.expand-toggle:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

.expand-icon {
    transition: transform 0.3s;
    font-size: 10px;
}

.flight-card.expanded .expand-icon {
    transform: rotate(180deg);
}

/* ── Aircraft showcase ────────────────────────────────────────────────────── */

.aircraft-showcase {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.3));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.aircraft-showcase::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.aircraft-photo {
    width: 180px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.aircraft-photo.wide {
    width: 220px;
    height: 130px;
}

.aircraft-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.9) saturate(1.1);
}

.aircraft-showcase:hover .aircraft-photo img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1.2);
}

.photo-fallback {
    font-size: 48px;
    opacity: 0.3;
}

.ac-svg {
    width: 100%;
    height: 100%;
}

.aircraft-info-block {
    flex: 1;
    min-width: 0;
}

.aircraft-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.aircraft-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mfr-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--accent-glow);
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wb-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--purple-bg);
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nb-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-glass);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-light);
}

/* ── Seat layout visual ───────────────────────────────────────────────────── */

.seat-layout {
    margin-top: 8px;
}

.seat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seat-config-label {
    font-weight: 600;
    color: var(--accent);
    font-size: 12px;
}

.seat-map-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.08);
    width: fit-content;
}

.seat-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.seat {
    width: 10px;
    height: 12px;
    border-radius: 2px 2px 3px 3px;
    transition: background 0.2s;
}

.seat.window {
    background: rgba(59, 130, 246, 0.5);
}

.seat.aisle {
    background: rgba(59, 130, 246, 0.35);
}

.seat.middle {
    background: rgba(59, 130, 246, 0.2);
}

.seat-aisle-gap {
    width: 8px;
}

.seat-visual {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.06);
    padding: 4px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.seat-config {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ── Segment cards (multi-leg) ────────────────────────────────────────────── */

.flight-segments {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.segment-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.seg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.seg-header .seg-airline {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.seg-header .seg-flight-nr {
    font-family: 'SF Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    padding: 1px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

.seg-route-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seg-endpoint {
    text-align: center;
    min-width: 50px;
}

.seg-endpoint .seg-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.seg-endpoint .seg-apt {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.seg-connector {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.seg-dur {
    font-size: 11px;
    color: var(--text-secondary);
}

.seg-line-mini {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-muted), transparent);
}

.seg-dist {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.7;
}

.seg-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
}

.seg-aircraft {
    background: var(--purple-bg);
    color: var(--purple);
    padding: 2px 8px;
    border-radius: 4px;
}

.seg-seats {
    background: var(--cyan-bg);
    color: var(--cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', monospace;
}

.seg-codeshare {
    color: var(--text-muted);
    font-style: italic;
}

/* ── Layover card ─────────────────────────────────────────────────────────── */

.layover-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    margin: 2px 0 2px 20px;
    background: var(--orange-bg);
    border-left: 3px solid var(--orange);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12px;
    color: var(--orange);
}

.layover-icon { font-size: 14px; }

.layover-text { font-weight: 500; }

/* ── Ticket deadline ──────────────────────────────────────────────────────── */

.ticket-deadline {
    margin-top: 12px;
    padding: 8px 14px;
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-xs);
    font-size: 12px;
    color: #fca5a5;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOOKING OVERLAY (Fixed, covers screen, niet meer in card)
   ═══════════════════════════════════════════════════════════════════════════ */

.booking-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.booking-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.booking-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.booking-overlay-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 70vh;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-overlay.open .booking-overlay-panel {
    transform: translateY(0);
}

.booking-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    font-weight: 600;
}

.booking-overlay-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.booking-overlay-close:hover {
    background: var(--red-bg);
    color: var(--red);
}

.booking-overlay-body {
    overflow-y: auto;
    padding: 8px 0;
    flex: 1;
}

.booking-section-header {
    padding: 12px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.booking-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.booking-link:hover {
    background: var(--accent-glow);
    border-left-color: var(--accent);
}

.booking-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.booking-name {
    flex: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cheapest-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #000;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.booking-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}

.booking-price.cheapest {
    color: #10b981;
    font-size: 16px;
}

.booking-price.unknown {
    color: var(--text-muted);
    font-size: 12px;
}

.booking-arrow {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.booking-link:hover .booking-arrow {
    transform: translate(2px, -2px);
    color: var(--accent);
}

.booking-link.is-cheapest {
    background: rgba(16, 185, 129, 0.06);
    border-left-color: #10b981;
}

.booking-price-note {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.booking-price-note.live-done {
    color: #10b981;
}

/* ── Live scraping status in overlay header ───────────────────────────────── */

.live-scraping-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

.live-scraping-status.done {
    color: #10b981;
}

.live-scraping-status.error {
    color: var(--red);
}

.scrape-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: scrape-spin 0.8s linear infinite;
}

@keyframes scrape-spin {
    to { transform: rotate(360deg); }
}

.scrape-done-icon {
    font-size: 14px;
}

/* ── Live vs estimated price styling ──────────────────────────────────────── */

.booking-price.live {
    color: #10b981;
    position: relative;
}

.booking-price.estimated {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

.live-dot {
    font-size: 8px;
    color: #10b981;
    vertical-align: super;
    margin-left: 2px;
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-tag {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.booking-link.is-live {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.03);
}

.booking-link.is-live:hover {
    background: rgba(16, 185, 129, 0.08);
}

/* ── Shimmer loading effect op prijzen ────────────────────────────────────── */

.booking-price.shimmer {
    position: relative;
    overflow: hidden;
}

.booking-price.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.08) 40%,
        rgba(59, 130, 246, 0.15) 50%,
        rgba(59, 130, 246, 0.08) 60%,
        transparent 100%
    );
    animation: price-shimmer 1.8s ease-in-out infinite;
}

@keyframes price-shimmer {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

/* Cheapest site info on card */
.cheapest-site {
    font-size: 11px;
    color: #10b981;
    margin-top: 4px;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

/* Shimmer loading voor card prijzen */
.cheapest-site.card-price-loading {
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.cheapest-site.card-price-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: cardPriceShimmer 1.8s ease infinite;
}

@keyframes cardPriceShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Live prijs op kaart */
.cheapest-site.has-live-price {
    color: #10b981;
    font-weight: 500;
}

.cheapest-site .live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
    animation: livePulse 2s ease infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

/* Live prijs update op hoofdprijs */
.flight-price.live-price-updated {
    animation: priceFlash 0.6s ease;
}

@keyframes priceFlash {
    0% { color: #10b981; transform: scale(1.08); }
    50% { color: #34d399; }
    100% { color: inherit; transform: scale(1); }
}

.price-breakdown.live-breakdown {
    color: #10b981;
    font-size: 0.72rem;
}

/* ── Empty, Loading, Error states ─────────────────────────────────────────── */

.empty-state,
.loading-state,
.error-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-icon,
.error-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.empty-hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.loading-airplane {
    font-size: 56px;
    animation: fly 2s ease-in-out infinite;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4));
}

@keyframes fly {
    0%, 100% { transform: translateX(-20px) rotate(-5deg); }
    50% { transform: translateX(20px) rotate(5deg); }
}

.loading-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.retry-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 700px) {
    .search-title { font-size: 26px; }

    .card-main {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px 16px;
    }

    .flight-price-col {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: auto;
        padding-top: 14px;
        border-top: 1px solid var(--border-light);
    }

    .price-block { text-align: left; }

    .flight-route { gap: 10px; }

    .flight-endpoint .time { font-size: 20px; }

    .flight-path { min-width: 80px; }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .examples { justify-content: flex-start; }

    .example-chip { white-space: normal; text-align: left; }

    .detail-badge { font-size: 10px; padding: 2px 8px; }

    .aircraft-showcase { flex-direction: column; align-items: flex-start; }

    .aircraft-photo, .aircraft-photo.wide {
        width: 100%;
        max-width: 280px;
        height: 140px;
    }

    .seg-route-line { flex-wrap: wrap; }

    .expand-content { padding: 0 16px 12px; }

    .booking-overlay-panel {
        max-width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .cheapest-badge, .direct-badge-label { right: 12px; }
    .rank-badge { left: 12px; }
}

@media (max-width: 400px) {
    .flight-route {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .flight-path {
        flex-direction: row;
        min-width: auto;
    }

    .flight-line-container { flex: 1; }
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Selection ────────────────────────────────────────────────────────────── */

::selection {
    background: var(--accent-glow-strong);
    color: var(--text-primary);
}
