/**
 * Primary CTA buttons — Apple-inspired filled style.
 * Teal brand color preserved; cosmetic layer only.
 */

.btn.btn--solid.show-flights-btn,
.btn.btn--solid.book-btn,
.show-flights-btn,
.book-btn.btn--solid,
.flight-card-compact .action-buttons .book-btn,
.fp-multi-leg-card .action-buttons .book-btn,
.flight-page .fp-book-btn,
#flight-details-popup .popup-footer .book-btn,
#booking-details-modal .popup-footer .book-btn {
    --cta-apple-top: #14c9b5;
    --cta-apple-mid: var(--primary);
    --cta-apple-bottom: var(--primary-dark);
    --cta-apple-hover-top: #16d4bf;
    --cta-apple-hover-mid: var(--primary-hover);
    --cta-apple-hover-bottom: #098f7f;

    background: linear-gradient(
        180deg,
        var(--cta-apple-top) 0%,
        var(--cta-apple-mid) 46%,
        var(--cta-apple-bottom) 100%
    );
    border: none;
    color: #fff;
    font-family:
        -apple-system, blinkmacsystemfont, "SF Pro Text", "SF Pro Display",
        system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    box-shadow:
        0 0.5px 1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        background 0.2s ease,
        transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 0.15s ease,
        box-shadow 0.2s ease;
}

.btn.btn--solid.show-flights-btn:hover,
.btn.btn--solid.book-btn:hover,
.show-flights-btn:hover,
.book-btn.btn--solid:hover,
.flight-card-compact .action-buttons .book-btn:hover,
.fp-multi-leg-card .action-buttons .book-btn:hover,
.flight-page .fp-book-btn:hover,
#flight-details-popup .popup-footer .book-btn:hover,
#booking-details-modal .popup-footer .book-btn:hover {
    background: linear-gradient(
        180deg,
        var(--cta-apple-hover-top) 0%,
        var(--cta-apple-hover-mid) 46%,
        var(--cta-apple-hover-bottom) 100%
    );
    color: #fff;
    transform: none;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn.btn--solid.show-flights-btn:active,
.btn.btn--solid.book-btn:active,
.show-flights-btn:active,
.book-btn.btn--solid:active,
.flight-card-compact .action-buttons .book-btn:active,
.fp-multi-leg-card .action-buttons .book-btn:active,
.flight-page .fp-book-btn:active,
#flight-details-popup .popup-footer .book-btn:active,
#booking-details-modal .popup-footer .book-btn:active {
    transform: scale(0.97);
    opacity: 0.94;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.show-flights-btn {
    border-radius: 980px;
    min-height: 48px;
    padding: 0.75rem 1.75rem;
    font-size: 17px;
}

.flight-card-compact .action-buttons .book-btn,
.fp-multi-leg-card .action-buttons .book-btn {
    border-radius: 10px;
    min-height: 36px;
    padding: 0 16px;
    font-size: 13px;
    letter-spacing: -0.01em;
    border-right: none;
    flex: 1 1 auto;
    gap: 0;
}

#flight-details-popup .popup-footer .book-btn,
#booking-details-modal .popup-footer .book-btn {
    border-radius: 980px;
    min-height: 44px;
    padding: 0 22px;
    font-size: 15px;
    border-right: none;
}

.flight-page .fp-book-btn {
    width: 100%;
    border-radius: 980px;
    min-height: 44px;
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    border-right: none;
}

/* ── Booked state — Apple system green ── */

.flight-card-compact .action-buttons .book-btn.booked,
.fp-multi-leg-card .action-buttons .book-btn.booked,
.btn.btn--solid.book-btn.booked,
.btn.btn--solid.book-btn.is-success.booked,
#flight-details-popup .popup-footer .book-btn.booked,
#booking-details-modal .popup-footer .book-btn.booked,
.flight-page .fp-book-btn.booked {
    --booked-top: #3ee07a;
    --booked-mid: #34c759;
    --booked-bottom: #248a3d;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.018em;
    background: linear-gradient(
        180deg,
        var(--booked-top) 0%,
        var(--booked-mid) 46%,
        var(--booked-bottom) 100%
    );
    color: #fff;
    cursor: default;
    pointer-events: none;
    opacity: 1;
    border: none;
    box-shadow: none;
    transform: none;
}

.flight-card-compact .action-buttons .book-btn.booked:hover,
.fp-multi-leg-card .action-buttons .book-btn.booked:hover,
.btn.btn--solid.book-btn.booked:hover,
.btn.btn--solid.book-btn.is-success.booked:hover,
#flight-details-popup .popup-footer .book-btn.booked:hover,
#booking-details-modal .popup-footer .book-btn.booked:hover,
.btn.btn--solid.book-btn.is-success.booked:disabled,
.btn.btn--solid.book-btn.is-success.booked:disabled:hover {
    background: linear-gradient(
        180deg,
        var(--booked-top) 0%,
        var(--booked-mid) 46%,
        var(--booked-bottom) 100%
    );
    color: #fff;
    transform: none;
    box-shadow: none;
}

.flight-card-compact .action-buttons .book-btn.booked,
.fp-multi-leg-card .action-buttons .book-btn.booked {
    border-radius: 10px;
    min-height: 36px;
    padding: 0 14px;
}

#flight-details-popup .popup-footer .book-btn.booked,
#booking-details-modal .popup-footer .book-btn.booked,
.flight-page .fp-book-btn.booked {
    border-radius: 980px;
    min-height: 44px;
    padding: 0 20px;
    font-size: 15px;
}

.show-flights-btn:disabled {
    background: rgba(60, 60, 67, 0.18);
    color: rgba(60, 60, 67, 0.55);
    box-shadow: none;
    opacity: 1;
}

.show-flights-btn:disabled:hover {
    background: rgba(60, 60, 67, 0.18);
    transform: none;
    box-shadow: none;
}

/* ── Show flights: searching state — iOS activity indicator ── */

.show-flights-btn.is-loading,
.show-flights-btn.is-loading:disabled,
.show-flights-btn.is-loading:disabled:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: progress;
    pointer-events: none;
    color: #fff;
    opacity: 1;
    background: linear-gradient(
        180deg,
        var(--cta-apple-top) 0%,
        var(--cta-apple-mid) 46%,
        var(--cta-apple-bottom) 100%
    );
    box-shadow:
        0 0.5px 1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: none;
}

.show-flights-btn__loading-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.show-flights-btn__label {
    letter-spacing: -0.024em;
    line-height: 1.15;
    white-space: nowrap;
}

.show-flights-btn__spinner {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: show-flights-spin 0.72s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .show-flights-btn__spinner {
        animation: none;
        border-top-color: rgba(255, 255, 255, 0.72);
        opacity: 0.9;
    }
}
