/* ============================================================
   All American Tradesman CE — Checkout Modal Styles
   ============================================================ */

.checkout-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.checkout-overlay.show {
    display: flex;
}

.checkout-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}
.checkout-close:hover { color: #111; }

.checkout-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.checkout-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px;
}
.checkout-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #004080;
}

.checkout-field {
    margin-bottom: 16px;
}
.checkout-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.checkout-field input {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.checkout-field input:focus {
    border-color: #004080;
    box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.12);
}

.required-star {
    color: #e53e3e;
    font-weight: 700;
}

.checkout-field-hint {
    display: block;
    color: #888;
    font-size: 0.75rem;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.checkout-required-info {
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px dashed #eee;
}

#card-element {
    padding: 11px 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s;
}
#card-element.StripeElement--focus {
    border-color: #004080;
    box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.12);
}
#card-element.StripeElement--invalid {
    border-color: #e53e3e;
}

.checkout-error {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-bottom: 10px;
    min-height: 18px;
}

.checkout-pay-btn {
    width: 100%;
    background: linear-gradient(to right, #B22222, #8b1a1a);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 6px;
    letter-spacing: 0.3px;
}
.checkout-pay-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}
.checkout-pay-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.checkout-divider {
    text-align: center;
    color: #aaa;
    font-size: 0.78rem;
    margin: 18px 0;
    position: relative;
}
.checkout-divider::before,
.checkout-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #e5e7eb;
}
.checkout-divider::before { left: 0; }
.checkout-divider::after  { right: 0; }

.checkout-secure {
    text-align: center;
    font-size: 0.77rem;
    color: #aaa;
    margin: 18px 0 0;
}

/* Success state */
.checkout-success-icon {
    font-size: 3.5rem;
    color: #22c55e;
    text-align: center;
    margin: 8px 0 16px;
}
#checkout-success h3 {
    text-align: center;
    color: #1a1a1a;
    font-size: 1.3rem;
    margin: 0 0 12px;
}
#checkout-success p {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 8px;
}
.checkout-success-sub {
    font-size: 0.83rem !important;
    color: #888 !important;
}
.checkout-success-sub a { color: #004080; }

/* Pricing section — updated CTA area */
.existing-account-note {
    text-align: center;
    font-size: 0.88rem;
    color: #666;
    margin-top: 10px;
}
.existing-account-note a {
    color: #004080;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .checkout-modal {
        padding: 24px 20px;
        border-radius: 10px;
    }
    .checkout-price { font-size: 1.8rem; }
}
