/* ── Route Bar ─────────────────────────────────────────── */

.search-section {
    position: relative;
    margin-bottom: 0px;
    margin-top:35px;
}

.search-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fg-2);
    margin-bottom: 8px;
    display: block;
    
}

.route-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    padding: 4px 4px;
    min-height: 48px;
    position: relative;
}

.route-clear {
    background: none;
    border: none;
    color: var(--fg-4);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    flex-shrink: 0;
    display: none;
}

.route-clear:hover {
    color: var(--fg);
}

.route-clear.visible {
    display: block;
}

.route-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.route-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: calc(var(--radius)-1px);
    background: var(--bg-emphasis);
    color: var(--fg-inv);
    letter-spacing: 1px;
    white-space: nowrap;
}

.route-badge-close {
    background: none;
    border: none;
    color: var(--fg-inv);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.6;
    transition: opacity 0.15s;
    line-height: 1;
}

.route-badge-close:hover {
    opacity: 1;
}

.route-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 120px;
}

.route-input {
    width: 100%;
    padding: 8px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
    border: none;
    color: var(--fg);
    outline: none;
}

.route-input::placeholder {
    color: var(--fg-4);
    font-weight: 300;
}

.route-hint {
    font-size: 0.65rem;
    color: var(--fg-4);
    margin-top: 4px;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-top: none;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-4);
    transition: background 0.1s;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--bg-inset);
}

.autocomplete-item .icao {
    font-weight: 700;
    margin-right: 8px;
}

.autocomplete-item .name {
    font-weight: 400;
    color: var(--fg-2);
}

/* ── Badges ───────────────────────────────────────────── */

.badge-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--fg-2);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.5px;
}

.badge:hover {
    border-color: var(--fg);
    color: var(--fg);
}

.badge.active {
    background: var(--bg-emphasis);
    color: var(--fg-inv);
    border-color: var(--fg);
}

.quick-airports {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    padding: 0 4px;
}

.quick-airports.hidden {
    display: none;
}

.quick-airport {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 7px 8px;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    background: transparent;
    color: var(--fg-2);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: border-color 0.15s, color 0.15s, border-style 0.15s;
}

.quick-airport:hover {
    border-style: solid;
    border-color: var(--fg);
    color: var(--fg);
}

.quick-airport.hidden {
    display: none;
}

/* Small screens: keep only the first two suggestions (LIMC, LIML) */
@media (max-width: 768px) {
    .quick-airport:nth-child(3) {
        display: none;
    }
}

/* Very narrow screens: no suggestions at all */
@media (max-width: 300px) {
    .quick-airports {
        display: none;
    }
}
