/* GT Design pay — Stripe Checkout layout */
:root {
    --bg: #f6f9fc;
    --panel: #0a2540;
    --panel-text: #ffffff;
    --panel-muted: rgba(255, 255, 255, 0.65);
    --surface: #ffffff;
    --text: #30313d;
    --muted: #697386;
    --line: #e3e8ee;
    --focus: #635bff;
    --pay: #635bff;
    --pay-hover: #5851ea;
    --product-accent: var(--pay);
    --ok: #09825d;
    --err: #df1b41;
    --r: 8px;
}

body.pay-hub {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    --pay: var(--product-accent, #635bff);
    --pay-hover: color-mix(in srgb, var(--product-accent, #635bff) 88%, #000);
    --focus: var(--product-accent, #635bff);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

a { color: inherit; text-decoration: none; }

.checkout-shell { min-height: 100vh; }

/* Mobile sticky summary bar */
.mobile-sticky {
    display: none;
}

@media (max-width: 899px) {
    .mobile-sticky {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 20;
        padding: 10px 16px;
        background: var(--panel);
        color: var(--panel-text);
        border-bottom: 3px solid var(--product-accent, #635bff);
        box-shadow: 0 2px 8px rgba(10, 37, 64, 0.15);
    }

    .mobile-sticky.is-hidden {
        display: none;
    }

    .mobile-sticky-product {
        font-size: 0.875rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-sticky-amount {
        font-size: 1.125rem;
        font-weight: 600;
        flex-shrink: 0;
    }
}

/* —— Grid: summary + form —— */
.checkout-grid {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 900px) {
    .checkout-grid {
        flex-direction: row;
        align-items: stretch;
    }
}

/* Dark summary panel */
.checkout-aside {
    background: var(--panel);
    color: var(--panel-text);
    flex-shrink: 0;
}

@media (max-width: 899px) {
    .checkout-aside {
        padding: 16px 20px 20px;
    }
}

@media (min-width: 900px) {
    .checkout-aside {
        width: 42%;
        max-width: 480px;
        min-height: 100vh;
        padding: 32px 40px 48px;
        position: sticky;
        top: 0;
        align-self: flex-start;
        border-right: 4px solid var(--product-accent, rgba(255, 255, 255, 0.2));
    }
}

.aside-inner {
    max-width: 380px;
}

@media (min-width: 900px) {
    .aside-inner {
        margin-left: auto;
        margin-right: 0;
    }
}

.aside-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--panel-muted);
    margin-bottom: 20px;
}

@media (min-width: 900px) {
    .aside-back { margin-bottom: 40px; }
}

.aside-back:hover { color: var(--panel-text); }

.aside-brand {
    margin-bottom: 20px;
}

.aside-product-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 4px;
    color: var(--panel-text);
}

@media (min-width: 900px) {
    .aside-product-name { font-size: 1.375rem; }
}

.aside-plan-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--panel-text);
    margin-bottom: 2px;
}

.aside-billing-period {
    font-size: 0.8125rem;
    color: var(--panel-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.aside-merchant {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--panel-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.aside-amount {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

@media (min-width: 900px) {
    .aside-amount { font-size: 2.75rem; margin-bottom: 12px; }
}

.aside-tagline {
    font-size: 0.875rem;
    color: var(--panel-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

.aside-product {
    font-size: 0.9375rem;
    color: var(--panel-muted);
    margin-bottom: 16px;
}

.aside-bullets {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.aside-bullets li {
    position: relative;
    padding-left: 1.1em;
    font-size: 0.8125rem;
    color: var(--panel-muted);
    line-height: 1.45;
    margin-bottom: 6px;
}

.aside-bullets li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--product-accent, rgba(255, 255, 255, 0.7));
    font-weight: 700;
}

.aside-vat-lines {
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 14px;
    margin-bottom: 14px;
}

.aside-vat-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8125rem;
    padding: 4px 0;
    color: var(--panel-muted);
}

.aside-vat-lines li strong {
    color: var(--panel-text);
    font-weight: 500;
}

.aside-vat-lines li.aside-vat-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.875rem;
}

.aside-vat-lines li.aside-vat-total strong {
    font-weight: 600;
    font-size: 1rem;
}

.aside-lines {
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 14px;
    display: none;
}

@media (min-width: 900px) {
    .aside-lines { display: block; }
}

.aside-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.875rem;
    padding: 5px 0;
    color: var(--panel-muted);
}

.aside-lines li strong {
    color: var(--panel-text);
    font-weight: 500;
}

.aside-hub {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    color: var(--panel-muted);
    letter-spacing: 0.02em;
}

.aside-vat {
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--panel-muted);
}

/* White form panel */
.checkout-main {
    flex: 1;
    background: var(--surface);
    padding: 0;
    min-height: 0;
}

.form-inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

@media (min-width: 900px) {
    .form-inner {
        padding: 48px 48px 64px 40px;
        margin: 0;
        max-width: 540px;
    }
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 18px 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(10, 37, 64, 0.04);
}

.form-card-payment {
    border-color: color-mix(in srgb, var(--product-accent, var(--line)) 25%, var(--line));
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.06);
}

.form-card-legal {
    padding: 14px 18px;
    background: var(--bg);
    border-style: dashed;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--product-accent, var(--pay));
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    vertical-align: middle;
    line-height: 1;
}

.form-card > .block-label:first-child {
    margin-top: 0;
}

.test-banner {
    background: #fffbeb;
    border: 1px solid #f5d565;
    border-radius: var(--r);
    padding: 10px 14px;
    font-size: 0.8125rem;
    color: #7c5e10;
    margin-bottom: 24px;
    line-height: 1.4;
}

.form-block { margin-bottom: 28px; }

.block-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

@media (min-width: 900px) {
    .block-label {
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--muted);
    }
}

.payment-block {
    padding-top: 0;
    border-top: none;
}

.field { margin-bottom: 14px; }

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.label-opt { font-weight: 400; color: var(--muted); }

input[type="email"],
input[type="text"] {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    font-size: 16px;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder { color: #a3acb9; }

input:hover { border-color: #c4cad4; }

input:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.2);
}

@keyframes onAutoFillStart { from {} to {} }
input:-webkit-autofill { animation-name: onAutoFillStart; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-row .field { margin-bottom: 14px; }

.field-row-zip {
    grid-template-columns: 110px 1fr;
}

@media (max-width: 400px) {
    .field-row:not(.field-row-zip) { grid-template-columns: 1fr; }
}

.type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 4px;
    margin-bottom: 18px;
    gap: 4px;
}

.type-btn {
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 11px 10px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}

.type-btn.on {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text);
    margin: 0 0 14px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r);
    cursor: pointer;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--pay);
    flex-shrink: 0;
}

.check-row.legal-consent {
    align-items: flex-start;
    margin-top: 4px;
    margin-bottom: 18px;
    cursor: default;
}

.check-row.legal-consent span {
    line-height: 1.45;
}

.check-row.legal-consent a {
    color: var(--pay);
    font-weight: 600;
    text-decoration: underline;
}

.check-row.czs-discount {
    margin-top: 4px;
    margin-bottom: 6px;
}

.czs-extra {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: var(--r);
    background: #fafaf9;
}

.czs-extra.hidden {
    display: none;
}

.check-row.czs-attest {
    margin-top: 8px;
    margin-bottom: 4px;
}

.czs-hint {
    margin: -4px 0 14px;
    font-size: 0.75rem;
    color: var(--muted);
}

.aside-lines li.hidden {
    display: none;
}

.payment-box {
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 14px 12px;
    margin-bottom: 16px;
    background: var(--surface);
    min-height: 48px;
}

.payment-placeholder {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
    padding: 4px 2px;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.35;
}

.btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: var(--r);
    padding: 15px 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, transform 0.05s;
}

.btn:active:not(:disabled) { transform: scale(0.985); }

.btn-pay {
    background: var(--pay);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.35);
}

.btn-pay:hover:not(:disabled) { background: var(--pay-hover); }

.btn-pay:disabled {
    background: #c4cad4;
    box-shadow: none;
    cursor: not-allowed;
}

.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

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

.pay-trust {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 14px;
}

.pay-trust strong { color: var(--text); font-weight: 500; }

.msg {
    margin-top: 12px;
    font-size: 0.875rem;
    min-height: 1.2em;
    padding: 10px 12px;
    border-radius: var(--r);
}

.msg.err {
    color: var(--err);
    background: #fef2f4;
    border: 1px solid #fbd5dc;
}

.hidden { display: none !important; }

/* Success */
.success-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.success-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 40px 28px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.success-icon {
    width: 52px;
    height: 52px;
    line-height: 52px;
    border-radius: 50%;
    background: #d7f5e9;
    color: var(--ok);
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.success-card h1 { font-size: 1.35rem; margin-bottom: 8px; }

.success-card p {
    color: var(--muted);
    font-size: 0.9375rem;
    margin-bottom: 24px;
}

.hint { font-size: 0.8125rem; color: var(--muted); margin-bottom: 16px; }

.landing-card,
.contact-note {
    max-width: 420px;
    margin: 48px auto;
    padding: 32px 24px;
    background: var(--surface);
    border-radius: 12px;
    text-align: center;
}

.contact-note {
    text-align: left;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.btn-primary {
    background: var(--pay);
    color: #fff;
    display: inline-block;
    padding: 12px 20px;
    border-radius: var(--r);
}
