/* Stripe-inspired checkout page */

.checkout-page {
    min-height: calc(100vh - 80px);
    padding: 2rem 1.5rem 4rem;
    color: #1a1f36;
}

.checkout-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.04),
        0 24px 60px -20px rgba(15, 23, 42, 0.18),
        0 8px 24px -8px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

/* ============ LEFT: ORDER SUMMARY ============ */
.checkout-summary {
    padding: 3rem 3rem 2.5rem;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 100%);
    border-right: 1px solid #e7ebf0;
    display: flex;
    flex-direction: column;
}

.checkout-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.15s ease;
    width: max-content;
}

.checkout-back:hover {
    color: #0a4194;
}

.summary-eyebrow {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.summary-amount {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.summary-amount-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1f36;
    letter-spacing: -0.02em;
}

.summary-amount-period {
    font-size: 0.95rem;
    color: #6b7280;
}

.summary-line-items {
    padding-top: 1.5rem;
    border-top: 1px solid #e7ebf0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-line-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 0.125rem;
}

.summary-line-meta {
    font-size: 0.8125rem;
    color: #6b7280;
}

.summary-line-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1f36;
    white-space: nowrap;
}

.summary-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.4;
}

.summary-features .check {
    color: #0a4194;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.summary-totals {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid #e7ebf0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #1a1f36;
}

.summary-row-muted {
    color: #6b7280;
}

.summary-row-total {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e7ebf0;
    font-size: 1rem;
    font-weight: 600;
}

.summary-fineprint {
    margin: 1.5rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ============ RIGHT: PAYMENT FORM ============ */
.checkout-form-wrap {
    padding: 3rem 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.checkout-form-card {
    flex: 1;
}

.checkout-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1f36;
    margin: 0 0 1.75rem;
    letter-spacing: -0.01em;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    flex: 1;
}

.field-row {
    display: flex;
    gap: 0.75rem;
}

.field label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4b5563;
}

.field input,
.field select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    color: #1a1f36;
    background: #ffffff;
    border: 1px solid #d6dae1;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: #0a4194;
    box-shadow:
        0 0 0 3px rgba(10, 65, 148, 0.12),
        0 1px 2px rgba(15, 23, 42, 0.04);
}

.field input::placeholder {
    color: #9ca3af;
}

.field-hint {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ===== Stripe Payment Element placeholder ===== */
.stripe-placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 8px;
}

.placeholder-row {
    display: flex;
    gap: 0.5rem;
}

.placeholder-row-split .placeholder-input {
    flex: 1;
}

.placeholder-input {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: #ffffff;
    border: 1px solid #d6dae1;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-height: 42px;
}

.placeholder-text {
    font-size: 0.9375rem;
    color: #c0c5cd;
    letter-spacing: 0.02em;
}

.placeholder-brands {
    display: inline-flex;
    gap: 0.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    padding: 0 5px;
    font-size: 0.625rem;
    font-weight: 700;
    color: #ffffff;
    border-radius: 3px;
    letter-spacing: 0.05em;
}

.brand-visa { background: #1a1f71; }
.brand-mc { background: #eb001b; }
.brand-amex { background: #2e77bb; }

/* ===== Error box ===== */
.checkout-error {
    margin-top: 0.25rem;
    padding: 0.75rem 0.875rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* ===== Pay button ===== */
.checkout-pay-btn {
    margin-top: 0.5rem;
    padding: 0.875rem 1rem;
    background: #0a4194;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow:
        0 1px 1px rgba(15, 23, 42, 0.06),
        0 2px 5px rgba(10, 65, 148, 0.25);
}

.checkout-pay-btn:hover:not(:disabled) {
    background: #0c4ba8;
    transform: translateY(-1px);
    box-shadow:
        0 1px 1px rgba(15, 23, 42, 0.06),
        0 6px 14px rgba(10, 65, 148, 0.3);
}

.checkout-pay-btn:active:not(:disabled) {
    transform: translateY(0);
}

.checkout-pay-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Secure footer ===== */
.checkout-secure {
    margin: 0.75rem 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.checkout-secure svg {
    color: #9ca3af;
}

.powered-by-stripe {
    font-weight: 700;
    color: #635bff;
    letter-spacing: 0.01em;
}

.checkout-foot {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.checkout-foot a {
    color: #6b7280;
    text-decoration: none;
}

.checkout-foot a:hover {
    color: #0a4194;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
    .checkout-page {
        padding: 1rem 0.75rem 2rem;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .checkout-summary {
        padding: 2rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid #e7ebf0;
    }

    .checkout-form-wrap {
        padding: 2rem 1.5rem;
    }

    .summary-amount-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .field-row {
        flex-direction: column;
        gap: 1rem;
    }
}
