/* ============================================
   CHECKOUT PAGE - Modern Sleek Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.checkout_body {
    min-height: 100%;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a3e 50%, #24243e 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    margin: 0;
}

.main_card {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    border: none;
}

/* Header */
.checkout_header {
    text-align: center;
    padding: 10px 0 20px;
}

.main_title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    font-weight: 400;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    color: #4ade80;
    font-size: 12px;
    font-weight: 500;
}
.security-badge i {
    font-size: 11px;
}

/* Section Titles */
.sel_saved_title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    margin-top: 8px;
}

/* Card Save Section */
.card_save {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
}

#setup-intent-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    transition: all 0.2s;
}
#setup-intent-result:focus-within {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.save_card_button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.save_card_button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}
.save_card_button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Saved Cards List */
.savedPaymentMethods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 0;
    /* overflow: visible; */
    overflow-x: scroll;
    overflow-y: unset;
}

/* Individual Credit Card */
.creditCard {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    height: auto;
    margin: 0;
    box-shadow: none;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 190px;
}
.creditCard:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.creditCard.is-default {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.checkout-default-badge {
    position: absolute;
    top: -8px;
    right: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-brand {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: static;
    top: auto;
    left: auto;
}

.brand-icon {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
}

.numDate {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.card-number {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 1px;
    margin: 0;
}

.card-expiry {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.pick_saved_card_button {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
    width: 100%;
}
.pick_saved_card_button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}
.pick_saved_card_button.default-payment-method {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #a5b4fc;
}
.pick_saved_card_button:disabled {
    cursor: default;
}

.no-cards {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    padding: 20px;
}

/* Footer */
.checkout_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-top: 10px;
}

.footer_left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}
.footer_left i {
    color: #4ade80;
    font-size: 14px;
}
.footer_left strong {
    color: #ffffff;
}

.footer_center {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Loading Spinner */
#loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 520px) {
    .checkout_body {
        padding: 12px;
    }
    .main_card {
        gap: 16px;
    }
    .card_save {
        padding: 16px;
        border-radius: 12px;
    }
    .main_title {
        font-size: 24px;
    }
    .checkout_footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .card-number {
        font-size: 16px;
    }
}
