/**
 * Homepage Checkout Styles - Nordersun v6.2
 * Matches the dashboard Order Summary modal design
 */

/* ======== STEP 2: CONSISTENT FORM STYLING ======== */

/* Card Details label — match .form-group label style */
.stripe-card-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a68;
    margin-bottom: 6px;
}

/* Card container — match .form-input style */
.stripe-card-container {
    padding: 14px 16px;
    background: white;
    border: 2px solid rgba(0, 113, 220, 0.3);
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stripe-card-container:focus-within {
    border-color: #0071dc;
    box-shadow: 0 0 0 3px rgba(0, 113, 220, 0.1);
}

.stripe-card-container.StripeElement--invalid {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

#stripe-card-element {
    min-height: 24px;
}

#stripe-card-errors {
    color: #ef4444;
    font-size: 12px;
    margin-top: 8px;
    min-height: 16px;
}

/* Card form group — match .form-group spacing */
.card-form-group {
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

/* ======== WELCOME BACK BANNER (Step 2) ======== */
.welcome-back-banner {
    text-align: center;
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f1fb 100%);
    border: 1px solid #d4e4f7;
    border-radius: 12px;
}

.welcome-back-banner .welcome-hello {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.welcome-back-banner .welcome-hello span {
    color: #0071dc;
}

.welcome-back-banner .welcome-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-top: 4px;
}

/* ======== STEP 3: ORDER SUMMARY ======== */
#step3Checkout {
    animation: fadeInUp 0.3s ease;
    padding: 20px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Title */
#step3Checkout .order-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

/* -- Plan Card -- */
#step3Checkout .order-plan-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f1fb 100%);
    border: 1px solid #d4e4f7;
    border-radius: 14px;
    padding: 18px 16px;
    margin-bottom: 4px;
}

#step3Checkout .order-plan-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

#step3Checkout .order-plan-flag {
    width: 52px;
    height: 39px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#step3Checkout .order-plan-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#step3Checkout .order-plan-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#step3Checkout .order-plan-name {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

#step3Checkout .order-plan-details {
    font-size: 13px;
    color: #4b6a94;
    font-weight: 500;
}

/* -- Price Section -- */
#step3Checkout .order-price-section {
    text-align: center;
    padding: 18px 0 14px;
    border-bottom: 1px solid #e8edf3;
    margin-bottom: 14px;
}

#step3Checkout .order-price-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

#step3Checkout .order-price-large {
    font-size: 36px;
    font-weight: 800;
    color: #0071dc;
    line-height: 1.1;
}

/* -- Customer Info -- */
#step3Checkout .order-customer-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e8edf3;
}

#step3Checkout .order-customer-info .customer-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

#step3Checkout .order-customer-info .customer-email {
    font-size: 13px;
    color: #0071dc;
    font-weight: 500;
}

/* -- Terms Checkbox -- */
#step3Checkout .checkbox-group {
    margin-bottom: 18px;
    padding: 0 4px;
}

#step3Checkout .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #4a4a68;
    line-height: 1.5;
}

#step3Checkout .checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #0071dc;
}

#step3Checkout .checkbox-label span {
    flex: 1;
}

#step3Checkout .checkbox-label a {
    color: #0071dc;
    text-decoration: underline;
    font-weight: 600;
}

#step3Checkout .checkbox-label a:hover {
    color: #005bb5;
}

/* -- Pay Button -- */
#step3Checkout .buy-now-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #0071dc, #004f9a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 113, 220, 0.3);
}

#step3Checkout .buy-now-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 220, 0.4);
}

#step3Checkout .buy-now-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    pointer-events: none;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: none;
}

#step3Checkout .buy-now-btn.processing {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    pointer-events: none;
}

/* -- Processing Overlay -- */
.checkout-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

.checkout-processing .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.checkout-processing .processing-text {
    color: #64748b;
    font-size: 14px;
}

/* -- Error Message -- */
.checkout-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: #dc2626;
    font-size: 13px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-error i {
    color: #ef4444;
    flex-shrink: 0;
}

/* -- Payment Result (Success) -- */
#step3Checkout .payment-result-message {
    margin-top: 16px;
}

#step3Checkout .payment-success {
    text-align: center;
    padding: 24px 16px;
}

#step3Checkout .payment-success .success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

#step3Checkout .payment-success h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

#step3Checkout .payment-success p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
    #step3Checkout .order-plan-card {
        padding: 14px 12px;
    }

    #step3Checkout .order-plan-flag {
        width: 44px;
        height: 33px;
    }

    #step3Checkout .order-plan-name {
        font-size: 15px;
    }

    #step3Checkout .order-plan-details {
        font-size: 12px;
    }

    #step3Checkout .order-price-large {
        font-size: 30px;
    }

    #step3Checkout .order-customer-info .customer-name {
        font-size: 14px;
    }

    #step3Checkout .order-customer-info .customer-email {
        font-size: 12px;
    }

    #step3Checkout .checkbox-label {
        font-size: 12px;
    }

    #step3Checkout .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    #step3Checkout .buy-now-btn {
        padding: 13px 20px;
        font-size: 15px;
    }

    .welcome-back-banner .welcome-hello {
        font-size: 20px;
    }
}
