/* --- Checkout Screen & Animation Styles --- */
#checkout-wrapper {
    margin: auto;
    width: 80%;
    height: 100%;
    background-color: rgba(240, 242, 245, 0.95);
    z-index: 9999;
    display: none; /* Initially hidden */
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0; /* Start faded out */
    transform: scale(0.9); /* Start slightly scaled down */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#checkout-wrapper.show {
    /* display: flex;  */
    opacity: 1;
    transform: scale(1);
}

.checkout-container {
    display: flex;
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}



/* --- Right Side: Payment --- */
.checkout-payment {
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
}
.checkout-payment h2 {
    text-align: center;
    font-size: 36px !important;
    margin-top: 0;
    color: #DF0050 !important;
}
.checkout-payment p {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}
#checkout-payment-form .form-group {
    margin-bottom: 20px;
}
#checkout-payment-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}
#checkout-payment-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}
#checkout-payment-form input:disabled {
    background-color: #f0f2f5;
    cursor: not-allowed;
}

/* --- Real Stripe Element Styles --- */
#card-element {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
}
#card-errors {
    color: #fa755a;
    font-size: 13px;
    margin-top: 8px;
}

#checkout-pay-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #DF0050;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}
#checkout-pay-button:hover {
    background-color: #b90042;
}

/* Final Success Message */
#success-message {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(240, 242, 245, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: green;
    font-size: 20px;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .checkout-container {
        flex-direction: column;
        max-width: 400px;
        max-height: 90vh;
        overflow-y: auto;
    }
    .checkout-summary, .checkout-payment {
        width: 100%;
    }
}


/* --- Finalizing Account Notice Styles --- */
#redirect-processing-notice {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f7f7f7; /* A soft, clean background */
    z-index: 10001; /* Ensure it's on top of everything */
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

#redirect-processing-notice h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

#redirect-processing-notice p {
    font-size: 16px;
    color: #666;
    margin-top: 0;
}

/* Simple CSS Loading Spinner */
#redirect-processing-notice .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #DF0050; /* Your theme color */
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px; /* Space between spinner and text */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Responsive adjustments for checkout wrapper --- */
@media (max-width: 768px) {
    #checkout-wrapper {
        width: 100%;
        transform: scale(1);
    }
}