/* === Billing Page Styles === */

.billing-section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
}

.billing-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: start;
}

/* Plan Summary */
.plan-summary {
    padding: 36px 32px;
}

/* Deal Breakdown */
.deal-heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.deal-breakdown {
    position: relative;
    z-index: 2;
}

.deal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.deal-row-label {
    color: var(--text-secondary);
}

.deal-row-label.bonus {
    color: #22c55e;
}

.deal-row-label.discount {
    color: #22c55e;
}

.deal-row-value.discount {
    color: #22c55e;
    font-weight: 600;
}

.deal-row-value {
    color: var(--text-primary);
    font-weight: 500;
}

.deal-row-value.strikethrough {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.5;
}

.deal-badge-free {
    background: #22c55e;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.deal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 12px 0;
    position: relative;
    z-index: 2;
}

.deal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.plan-name-summary {
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 24px;
    transition: color 0.2s;
    position: relative;
    z-index: 2;
}

.back-link:hover {
    color: var(--text-primary);
}

.plan-summary h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.plan-price {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.plan-price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    position: relative;
    z-index: 2;
}

.plan-features li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-left: 24px;
    position: relative;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* Payment Card */
.payment-card {
    padding: 36px 32px;
}

.payment-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 98, 204, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Credit Card Container */
.card-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.card-field-group {
    margin-bottom: 16px;
}

.card-field-group:last-child {
    margin-bottom: 0;
}

.card-field-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Stripe Element Containers */
.stripe-element {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stripe-element.StripeElement--focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 98, 204, 0.15);
}

.stripe-element.StripeElement--invalid {
    border-color: #E53935;
}

/* Expiry + CVC row inside card container */
.card-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.card-bottom-row .card-field-group {
    margin-bottom: 0;
}

.card-save-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Checkbox Groups */
.checkbox-group {
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.6;
}

.checkbox-label a {
    color: var(--accent);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--accent-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Terms Text */
.terms-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.terms-text a {
    color: var(--accent);
    text-decoration: underline;
}

.terms-text a:hover {
    color: var(--accent-hover);
}

/* Secured by Stripe */
.secured-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.secured-by strong {
    color: var(--text-secondary);
}

.checkout-info {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

#payment-element {
    min-height: 200px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

/* Error Message */
.error-message {
    color: #E53935;
    font-size: 13px;
    margin: 12px 0;
    min-height: 20px;
    position: relative;
    z-index: 2;
}

/* Subscribe Button */
.btn-subscribe {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #2962CC, #3B7FE8);
    color: white;
    border: 1px solid rgba(59, 127, 232, 0.4);
    border-radius: 50px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(41, 98, 204, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.btn-subscribe:hover {
    background: linear-gradient(135deg, #3B7FE8, #4D93FF);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(41, 98, 204, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-subscribe:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(41, 98, 204, 0.2);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
    margin: 0 auto 20px;
}

.success-message h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .billing-section {
        padding: 100px 0 60px;
    }
    .billing-container {
        grid-template-columns: 1fr;
        padding: 0 16px;
        gap: 20px;
    }
    .plan-summary, .payment-card {
        padding: 24px 20px;
    }
    .plan-price {
        font-size: 32px;
    }
    .deal-heading {
        font-size: 16px;
    }
    .btn-subscribe {
        font-size: 15px;
        padding: 14px 24px;
    }
}
