/*
 * Smart Filters (LEIS-924) — the filter panel's own first section (mounted
 * inside FlightFilterSidebar, not a sibling card above it — see that
 * component for why), so it draws no card chrome of its own: white
 * background and border come from .flight-filter-panel, and this only adds
 * the same bottom-border-plus-padding rhythm "Flight selection view" already
 * uses for a leading section. The sidebar's own text-md/fw-600 heading
 * treatment, the airline-search box's input style, and the shared
 * .flights-filter-chip pill (flight-filter-chips.css) for suggestion chips —
 * the same chip AppliedFiltersStrip and RelaxFilterChips use. Only the coral
 * sparkle accent is unique to this section, matching the sidebar's existing
 * "Reset All" / "+ N more" accent color rather than introducing a new one.
 */

.smart-filters-card {
    padding: 12px 16px 14px;
    border-bottom: 1px solid var(--bs-border-color);
}

.smart-filters-card__head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--color-second, #f45d6b);
}

.smart-filters-card__label {
    display: block;
    font-family: var(--font-family-inter);
    font-size: var(--bs-body-font-size, 0.9375rem);
    font-weight: 600;
    color: var(--color-black);
}

.smart-filters-card__subtitle {
    margin: 0;
    font-family: var(--font-family-inter);
    font-size: 0.6875rem;
    color: var(--color-text-muted, #6b7280);
}

.smart-filters-card__form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smart-filters-card__input {
    flex: 1 1 auto;
    min-width: 0;
    /* Matches FlightFilterSidebar's "Search airlines" box exactly (see
       .form-control.form-control-sm there) — same inline override reason:
       .filterDetails input.form-control:focus swaps the background, and this
       field should look identical at rest and on focus. */
    height: 38px;
}

.smart-filters-card__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--color-second, #f45d6b);
    /* Hardcoded, not var(--color-white-same) — that token resolves via
       light-dark(), which some environments don't evaluate, silently
       inheriting the ambient (black) text color for this icon instead. */
    color: #fff;
    cursor: pointer;
    transition: opacity .2s ease;
}

.smart-filters-card__send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.smart-filters-card__send:not(:disabled):hover {
    opacity: 0.88;
}

.smart-filters-card__send:focus-visible,
.smart-filters-card__input:focus-visible {
    outline: 2px solid var(--color-first, #2f6271);
    outline-offset: 1px;
}

.smart-filters-card__spinner {
    animation: smart-filters-spin 0.8s linear infinite;
}

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

.smart-filters-card__status {
    margin-top: 8px;
    font-family: var(--font-family-inter);
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-text-muted, #6b7280);
}

.smart-filters-card__status--applied {
    color: var(--color-black);
}

.smart-filters-card__status--warn {
    color: var(--color-second-dark, #c33643);
}

.smart-filters-card__unsupported {
    display: block;
    margin-top: 2px;
    color: var(--color-text-muted, #6b7280);
}

.smart-filters-card__undo {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-second, #f45d6b);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
}

.smart-filters-card__undo:hover {
    text-decoration: underline;
}

.smart-filters-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {
    .smart-filters-card__spinner { animation: none; }
    .smart-filters-card__send { transition: none; }
}
