* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#flight-search-widget {
    width: 100%;
}

/* ── TABS ── */
#flight-search-widget .tabs {
    display: flex;
    gap: 0;
    padding: 0 4px;
    margin-bottom: 10px;
}

#flight-search-widget .tab-btn {
    background: transparent;
    border: none;
    padding: 8px 18px 10px;
    font-weight: 500;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.78);
    cursor: pointer;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.01em;
}

#flight-search-widget .tab-btn i { font-size: 0.85rem; }

#flight-search-widget .tab-btn.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    font-weight: 600;
}

#flight-search-widget .tab-btn:hover:not(.active) {
    color: rgba(255,255,255,0.95);
}

/* ── PANELS ── */
#flight-search-widget .glass-panel { background: transparent; }
#flight-search-widget .tab-panel { display: none; }
#flight-search-widget .tab-panel.active-panel { display: block; }

/* ── SEARCH BAR PILL ── */
#flight-search-widget .search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    padding: 0 6px 0 0;
    height: 58px;
}

/* ── FIELDS ── */
#flight-search-widget .field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    flex: 1;
    min-width: 0;
    height: 100%;
    position: relative;
    border-right: 1px solid #e5e8ec;
}

#flight-search-widget .field:last-of-type { border-right: none; }

#flight-search-widget .field-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    /* Allow clicks to pass through to the hidden date/select input beneath */
    pointer-events: none;
}

/* Date and select fields: field-body must NOT block pointer events
   so the hidden <input type="date"> / <select> overlay can receive clicks */
#flight-search-widget .field:not(.location-field) .field-body {
    pointer-events: none;
    cursor: pointer;
}

#flight-search-widget .field-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
    line-height: 1;
}

#flight-search-widget .field-value {
    font-size: 0.78rem;
    color: #8a93a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Date pair */
#flight-search-widget .date-pair {
    display: flex;
    align-items: center;
    flex: 1.5;
    border-right: 1px solid #e5e8ec;
    height: 100%;
}
#flight-search-widget .date-pair .field { border-right: none; }
#flight-search-widget .date-arrow {
    color: #b0b8c4;
    font-size: 0.75rem;
    flex-shrink: 0;
    padding: 0 2px;
}

/* Hidden inputs — must be direct children of .field to use its position:relative correctly */
#flight-search-widget .field > input[type="date"],
#flight-search-widget .field > select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    z-index: 10;
    pointer-events: auto;
}

/* Make the whole date/select field show pointer cursor */
#flight-search-widget .field:not(.location-field) {
    cursor: pointer;
}

/* Field icon: no pointer events (let the overlay handle clicks) */
#flight-search-widget .field-icon {
    color: #6b7a8d;
    font-size: 0.95rem;
    flex-shrink: 0;
    pointer-events: none;
}

/* Visible text input for location */
#flight-search-widget .field.location-field {
    flex: 1.2;
}
#flight-search-widget .field.location-field .field-body {
    pointer-events: auto;
}
#flight-search-widget .field.location-field input[type="text"] {
    position: static;
    opacity: 1;
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.78rem;
    color: #8a93a0;
    background: transparent;
    padding: 0;
    cursor: text;
}
#flight-search-widget .field.location-field input[type="text"]::placeholder {
    color: #b0b8c4;
}

/* Dropdown — use fixed positioning so it never gets clipped or shrunk by flex parents */
#flight-search-widget .dropdown-list {
    position: fixed;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
    max-height: 260px;
    min-width: 260px;
    overflow-y: auto;
    z-index: 9999;
    border: 1px solid #e8ecf0;
    list-style: none;
    display: none;
}
#flight-search-widget .dropdown-list li {
    padding: 9px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #2d3a48;
    border-bottom: 1px solid #f3f5f7;
    transition: background 0.1s;
}
#flight-search-widget .dropdown-list li:last-child { border-bottom: none; }
#flight-search-widget .dropdown-list li:hover { background: #eaf4ff; }

/* ── SEARCH BUTTON ── */
#flight-search-widget .search-btn {
    background: #2f5fad;
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 0 22px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 4px;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}
#flight-search-widget .search-btn:hover {
    background: #264f96;
    transform: scale(1.02);
}
#flight-search-widget .search-btn i { font-size: 0.82rem; }

/* ── PLACEHOLDER PANELS ── */
#flight-search-widget .info-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    background: rgba(255,255,255,0.92);
    border-radius: 50px;
    color: #4a6074;
    font-size: 0.88rem;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* Hide old elements */
#flight-search-widget .flight-search-header,
#flight-search-widget footer,
#flight-search-widget .search-grid,
#flight-search-widget #flightResults { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    #flight-search-widget .search-bar {
        flex-wrap: wrap;
        height: auto;
        border-radius: 20px;
        padding: 10px;
        gap: 4px;
    }
    #flight-search-widget .field,
    #flight-search-widget .date-pair {
        flex: 1 1 45%;
        border-right: none;
        border-bottom: 1px solid #e5e8ec;
        padding: 10px 14px;
        height: auto;
        min-height: 48px;
    }
    #flight-search-widget .date-pair .field { border-bottom: none; }
    #flight-search-widget .search-btn {
        width: 100%;
        height: 42px;
        margin: 4px 0 0;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    #flight-search-widget .tab-btn { padding: 8px 12px; font-size: 0.8rem; }
    #flight-search-widget .field,
    #flight-search-widget .date-pair { flex: 1 1 100%; }
}
