/**
 * FFLP Checkout — Stripe Embedded Checkout Styles
 * @since 3.7.0
 */

/* ─── Checkout Overlay ─────────────────────────────────────── */

.fflp-checkout-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fflp-checkout-overlay.active {
    display: flex;
    opacity: 1;
}

body.fflp-checkout-open {
    overflow: hidden;
}

/* ─── Checkout Modal ───────────────────────────────────────── */

.fflp-checkout-modal {
    background: #fff;
    border-radius: 12px;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fflp-modal-slide-up 0.3s ease;
}

@keyframes fflp-modal-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fflp-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.fflp-checkout-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.fflp-checkout-overlay-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.fflp-checkout-overlay-close:hover {
    color: #1a1a1a;
}

#fflp-checkout-container {
    padding: 20px;
    min-height: 300px;
}

/* ─── Featured Section Styles ──────────────────────────────── */

.fflp-section-featured {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border: 1px solid #fbbf24;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.fflp-section-featured h2 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #92400e;
}

.fflp-featured-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fflp-featured-counter {
    display: block;
    font-size: 13px;
    color: #78716c;
    margin-top: 4px;
    font-weight: 400;
}

.fflp-featured-counter.exhausted {
    color: #dc2626;
    font-weight: 500;
}

.fflp-featured-paid-badge {
    display: block;
    font-size: 14px;
    color: #059669;
    font-weight: 600;
    margin-top: 8px;
}

/* ─── Purchase Button ──────────────────────────────────────── */

.fflp-featured-purchase,
.fflp-featured-upsell {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(251, 191, 36, 0.3);
}

.fflp-featured-upsell p {
    margin: 0 0 10px;
    font-size: 15px;
    color: #78716c;
}

.fflp-btn-stripe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.fflp-btn-stripe:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.fflp-btn-stripe:active {
    transform: translateY(0);
}

.fflp-btn-stripe.fflp-loading {
    opacity: 0.7;
    cursor: wait;
}

.fflp-upgrade-link {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.fflp-upgrade-link:hover {
    text-decoration: underline;
}

/* ─── Disabled Checkbox ────────────────────────────────────── */

.fflp-checkbox-label.fflp-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fflp-checkbox-label.fflp-disabled input {
    cursor: not-allowed;
}

/* ─── Toast Notifications ──────────────────────────────────── */

.fflp-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #065f46;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.fflp-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fflp-toast.fflp-toast-error {
    background: #991b1b;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 600px) {
    .fflp-checkout-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        animation: fflp-modal-slide-up-mobile 0.3s ease;
    }

    @keyframes fflp-modal-slide-up-mobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .fflp-btn-stripe {
        width: 100%;
        justify-content: center;
    }
}
