/* =========================
   PROGRESS STEPPER
========================= */

.progress-stepper {
    width: 100%;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-border-light);
    border: 2px solid var(--color-border-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-muted-alt);
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background-color: var(--color-navy-mid);
    border-color: var(--color-navy-mid);
    color: var(--color-white);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-muted-alt);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.active .step-label {
    color: var(--color-navy-mid);
}

.progress-line {
    flex: 1;
    height: 3px;
    background-color: var(--color-border-muted);
    margin: 0 -0.25rem;
    position: relative;
    top: -27px;
    transition: background-color 0.3s ease;
}

.progress-line.active {
    background-color: var(--color-navy-mid);
}

@media (max-width: 576px) {
    .progress-steps {
        gap: 0.25rem;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
        margin-top: 0.35rem;
    }

    .progress-line {
        top: -21px;
    }
}

/* =========================
   SHARED HEADINGS
========================= */

.flight-step-heading {
    color: var(--color-navy-heading);
    font-weight: 700;
}

.flight-section-heading {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-navy-heading);
    margin-bottom: .75rem;
}

/* =========================
   FLIGHT SEARCH FORM
========================= */

.flight-search-results .sublabel {
    color: gray;
    margin: 4px;
    font-size: 11px;
}

.flight-search-results button[type="submit"] {
    padding: 10px 20px;
}

.flight-search-results input[type="date"] {
    position: relative;
}

.flight-search-results input[type="date"]:before {
    content: attr(placeholder);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    color: rgba(0, 0, 0, 0.65);
    pointer-events: none;
    line-height: 1.5;
    padding: 10px 0.5rem 0 0.5rem;
}

.flight-search-results input[type="date"]:focus:before,
.flight-search-results input[type="date"]:not([value=""]):before {
    display: none;
}

.custom-bg {
    background-color: var(--color-surface-alt);
}

/* =========================
   FILTER PANEL
========================= */

.flight-search-results .filter-panel {
    border-radius: 1rem;
    border: 1px solid var(--color-border-light);
    background: var(--color-white);
}

.flight-search-results .filter-panel .form-label,
.flight-search-results .form-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.flight-search-results .filter-panel .form-control,
.flight-search-results .filter-panel .form-select,
.flight-search-results .filter-panel .form-range {
    border-radius: 0.75rem;
    min-width: 0;
}

.flight-search-results .filter-panel .mb-3 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flight-search-results .filter-panel .row > .col {
    min-width: 0;
}

/* =========================
   FLIGHT CARD
========================= */

.flight-card,
.flight-card__time,
.flight-card__price,
.flight-card__btn,
.flight-card__airline-name,
.flight-card__code,
.flight-card__duration,
.flight-card__stops {
    font-family: 'Raleway', sans-serif;
}

.flight-card {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}

.flight-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

.flight-card--selected {
    border-color: var(--color-navy-mid);
    background: var(--color-navy-selected);
}

/*  Airline column  */

.flight-card__airline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-align: center;
}

.flight-card__airline-name {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-muted);
}

/*  Route timeline  */

.flight-card__route {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
}

.flight-card__endpoint {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 68px;
}

.flight-card__endpoint--right {
    align-items: flex-end;
}

.flight-card__time {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1;
}

.flight-card__code {
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-navy-mid);
    letter-spacing: .05em;
}

.flight-card__city {
    font-size: .72rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.flight-card__date {
    font-size: .7rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.flight-card__timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.flight-card__duration {
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.flight-card__line {
    width: 100%;
    height: 2px;
    background: var(--color-border);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flight-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-navy-mid);
    flex-shrink: 0;
}

.flight-card__stops {
    font-size: .68rem;
    color: var(--color-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/*  Price + CTA  */

.flight-card__action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
    min-width: 120px;
}

.flight-card__pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.flight-card__price {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1;
}

.flight-card__per,
.flight-card__total {
    font-size: .7rem;
    color: var(--color-muted);
}

.flight-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .55rem 1.3rem;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--color-navy);
    color: var(--color-white);
    border: 2px solid var(--color-navy);
    transition: background .2s, border-color .2s;
    white-space: nowrap;
}

.flight-card__btn:hover {
    background: var(--color-navy-mid);
    border-color: var(--color-navy-mid);
    color: var(--color-white);
}

.flight-card__btn--selected {
    background: var(--color-white);
    color: var(--color-navy);
}

.flight-card__btn--selected:hover {
    background: var(--color-navy-selected);
    color: var(--color-navy);
}

/* =========================
   CONFIRM PAGE
========================= */

.flight-card--confirm {
    grid-template-columns: 110px 1fr auto;
}

.confirm-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--color-navy);
    color: var(--color-white);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-top: .5rem;
}

.results-back-bar {
    display: flex;
    justify-content: flex-end;
    background: var(--color-navy);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-top: .5rem;
}

.confirm-total__left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.confirm-total__label {
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.confirm-total__sub {
    font-size: .75rem;
    font-weight: 400;
    opacity: .7;
}

.confirm-total__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.confirm-total__price {
    font-family: 'Raleway', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.confirm-total__actions {
    display: flex;
    gap: .75rem;
}

.confirm-total__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .6rem 1.25rem;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, border-color .2s, color .2s;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, .3);
    background: transparent;
    color: var(--color-white);
}

.confirm-total__btn:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--color-white);
}

.confirm-total__btn--primary {
    background: var(--color-white);
    color: var(--color-navy);
    border-color: var(--color-white);
}

.confirm-total__btn--primary:hover {
    background: var(--color-navy-light);
    color: var(--color-navy);
    border-color: var(--color-navy-light);
}

/* =========================
   STEPPER WIDGET
========================= */

.stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border-muted);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
    background: var(--color-white);
}

.stepper-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--color-surface);
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.stepper-btn:hover {
    background: var(--color-border);
}

.stepper input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 14px;
    background: var(--color-white);
    outline: none;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
    .flight-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .flight-card__airline {
        flex-direction: row;
        justify-content: flex-start;
    }

    .flight-card__action {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: auto;
        width: 100%;
    }

    .flight-card__pricing {
        align-items: flex-start;
    }

    .confirm-total {
        flex-direction: column;
        align-items: flex-start;
    }

    .confirm-total__right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .confirm-total__actions {
        width: 100%;
        flex-direction: column;
    }

    .confirm-total__btn {
        width: 100%;
        justify-content: center;
    }
}