/* ── Reset ────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page ─────────────────────────────────────────────────────────────────── */
body {
    background: #f3f5f9;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.checkout-card {
    background: #fff;
    border-radius: 18px;
    max-width: 660px;
    width: 100%;
    box-shadow: 0 6px 32px rgba(0,0,0,.10);
    overflow: hidden;
}

/* ── Head ─────────────────────────────────────────────────────────────────── */
.checkout-head {
    background: #faf6f1;
    padding: 40px 60px 36px;
    border-bottom: 3px solid #cba783;
}
.checkout-head__logo {
    margin-bottom: 28px;
}
.checkout-head__logo img {
    height: 50px;
    width: auto;
}
/* ── Meta block: счёт, имя, email — единый стиль ──────────────────────────── */
.checkout-head__invoice {
    font-size: 13px;
    font-weight: 600;
    color: #b0a89a;
    margin-bottom: 2px;
}
.checkout-head__invoice span {
    font-weight: 600;
    color: #b0a89a;
}
.checkout-head__client {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
    align-items: baseline;
    font-size: 13px;
    font-weight: 600;
    color: #b0a89a;
    margin-bottom: 16px;
}
.checkout-head__client-name {
    font-weight: 600;
    color: #b0a89a;
}
.checkout-head__client-email {
    font-weight: 600;
    color: #b0a89a;
}

/* ── Item block: товар + invoice title — единый стиль ─────────────────────── */
.checkout-head__course {
    font-size: 28px;
    font-weight: 600;
    color: #413e59;
    margin-bottom: 3px;
    line-height: 1.3;
}
.checkout-head__invoice-title {
    font-size: 20px;
    font-weight: 400;
    color: #413e59;
    line-height: 1.4;
    margin-bottom: 20px;
}
.checkout-head__desc {
    font-size: 14px;
    color: #7a7090;
    line-height: 1.6;
    margin-bottom: 20px;
}
.checkout-head__meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.checkout-head__meta-item {
    font-size: 13px;
    color: #9b8c7a;
}
.checkout-head__meta-item span {
    color: #413e59;
    font-weight: 600;
}
.checkout-head__amount-label {
    font-size: 12px;
    color: #cba783;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 6px;
}

/* ── Discount display ──────────────────────────────────────────────────────── */
.checkout-head__amount-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.checkout-head__amount-original {
    font-size: 22px;
    font-weight: 600;
    color: #b0a89a;
    text-decoration: line-through;
    letter-spacing: -0.5px;
}
.checkout-head__discount-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.checkout-head__amount {
    font-size: 48px;
    font-weight: 800;
    color: #413e59;
    letter-spacing: -2px;
    line-height: 1;
}

/* ── Body ─────────────────────────────────────────────────────────────────── */
.checkout-body {
    padding: 36px 60px 40px;
}
.checkout-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #9b96b0;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 12px;
}

/* ── Pay row ──────────────────────────────────────────────────────────────── */
.pay-row {
    border: 1px solid #e4e0ef;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.pay-row:hover {
    border-color: #a67c52;
    box-shadow: 0 4px 16px rgba(166,124,82,.12);
}
.pay-row:hover .btn-pay {
    background: #8f6a43;
}
.pay-row--loading {
    pointer-events: none;
    opacity: .7;
}
.pay-row__info {
    flex: 1;
    min-width: 0;
}
.pay-row__logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.pay-row__logos img {
    height: 28px;
    width: auto;
}
.pay-row__logos img.logo-lg {
    height: 36px;
}
.pay-row__desc {
    font-size: 13px;
    color: #7a7090;
    line-height: 1.5;
}

/* ── Payment button ───────────────────────────────────────────────────────── */
.btn-pay {
    background: #a67c52;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
}
.btn-pay:hover { background: #8f6a43; }

/* ── Stripe element ───────────────────────────────────────────────────────── */
#stripe-element-container {
    display: none;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* ── Pay message ──────────────────────────────────────────────────────────── */
#pay-message {
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
    color: #c0392b;
    min-height: 20px;
}
#pay-message.error {
    color: #c0392b;
}
#pay-message.info {
    color: #7a7090;
}

/* ── Instruction block ────────────────────────────────────────────────────── */
.checkout-instruction {
    margin-top: 24px;
    background: #faf6f1;
    border-radius: 10px;
    padding: 20px 22px;
    border-left: 3px solid #cba783;
}
.checkout-instruction__title {
    font-size: 13px;
    font-weight: 700;
    color: #413e59;
    margin-bottom: 12px;
}
.checkout-instruction__list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.checkout-instruction__list li {
    font-size: 13px;
    color: #7a7090;
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}
.checkout-instruction__list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #cba783;
    font-weight: 700;
}
.checkout-instruction__tg {
    color: #229ED9;
    text-decoration: none;
    font-weight: 500;
}
.checkout-instruction__tg:hover { text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.checkout-footer {
    padding: 0 60px 28px;
    text-align: center;
    font-size: 12px;
    color: #bbb;
}

/* ── Tablet (≤ 660px) ─────────────────────────────────────────────────────── */
@media (max-width: 660px) {
    .checkout-head { padding: 32px 32px 28px; }
    .checkout-body { padding: 28px 32px 32px; }
    .checkout-instruction { padding: 20px 32px; }
    .checkout-footer { padding: 0 32px 24px; }
}

/* ── Mobile (≤ 480px) ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .checkout-head { padding: 24px 20px 22px; }
    .checkout-head__logo img { height: 40px; }
    .checkout-head__amount { font-size: 36px; }
    .checkout-head__meta { flex-direction: column; gap: 4px; }
    .checkout-body { padding: 20px 20px 24px; }
    .checkout-instruction { padding: 16px 20px; }
    .pay-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .btn-pay { width: 100%; text-align: center; }
    .checkout-footer { padding: 0 20px 20px; }
}
