/* ── Billing Toggle ── */
.billing-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 2rem;
    background: var(--gray-100, #f1f5f9);
    border-radius: 8px;
    padding: 4px;
    width: fit-content;
}
.billing-toggle button {
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-600, #64748b);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.billing-toggle button.active {
    background: white;
    color: var(--primary, #0d7377);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
}
.billing-toggle .save-badge {
    font-size: 0.75rem;
    color: var(--primary, #0d7377);
    margin-left: 4px;
}

/* ── Checkout Overlay ── */
#checkout-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.checkout-modal {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.checkout-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400, #9ca3af);
    padding: 4px 8px;
}
.checkout-close:hover { color: var(--gray-700, #374151); }
.checkout-modal h2 {
    margin: 0 0 4px;
    font-size: 1.4rem;
}
.checkout-subtitle {
    color: var(--gray-600, #64748b);
    margin: 0 0 16px;
    font-size: 0.9rem;
}
.checkout-summary {
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--primary, #0d7377);
}
.checkout-field {
    margin-bottom: 16px;
}
.checkout-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--gray-700, #374151);
}
.checkout-field input[type="text"],
.checkout-field input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.checkout-field input:focus {
    outline: none;
    border-color: var(--primary, #0d7377);
    box-shadow: 0 0 0 3px rgba(13,115,119,0.1);
}
.checkout-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.checkout-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #0d7377);
}
.checkout-setup-price {
    color: var(--gray-500, #6b7280);
    font-size: 0.85rem;
}
.checkout-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.checkout-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.checkout-btn-pay {
    flex: 1;
    position: relative;
}
.checkout-btn-cancel {
    flex-shrink: 0;
}
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success/Cancel Banner ── */
.checkout-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}
.checkout-banner-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.checkout-banner-canceled {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.checkout-banner-content strong {
    display: block;
    margin-bottom: 4px;
}
.checkout-banner-content p {
    margin: 0;
    font-size: 0.9rem;
}
.checkout-banner-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.6;
}
.checkout-banner-close:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .checkout-modal { padding: 24px 20px; }
    .checkout-actions { flex-direction: column; }
}
