/* ── Contract signing page (/sign/:token, contract.10xcourse.ai) ─────
   Focused single-column flow: soft radial-glow backdrop, glass cards,
   one brand-gradient hairline in the header. RTL throughout. */

.contract-sign {
    min-height: 100vh;
    padding: 0 var(--space-md) var(--space-2xl);
    background:
        radial-gradient(1100px 520px at 85% -80px, rgba(8, 148, 255, 0.07), transparent 65%),
        radial-gradient(900px 480px at 8% 160px, rgba(189, 50, 214, 0.05), transparent 60%),
        linear-gradient(180deg, #FFFFFF 0%, #F5F9FF 100%);
}

/* ── Sticky summary bar ────────────────────────────────── */

.cs-summary {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 calc(-1 * var(--space-md));
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-light);
}

.cs-summary__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 10px var(--space-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-color);
}

.cs-summary__course {
    font-weight: 600;
}

.cs-summary__sep {
    width: 1px;
    height: 14px;
    background: var(--border-default);
}

.cs-summary__amount {
    color: var(--text-secondary);
}

.cs-summary__status {
    margin-inline-start: auto;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 163, 4, 0.12);
    color: #9A6B00;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Header ────────────────────────────────────────────── */

.cs-header {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-xl) 0 var(--space-lg);
    text-align: center;
}

.cs-header__mark {
    height: 30px;
    display: inline-block;
}

.cs-header__title {
    margin: 14px 0 6px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.cs-header__company {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Compact 3-stop brand hairline - the single gradient accent on the page. */
.cs-header__rule {
    width: 56px;
    height: 2px;
    margin: 18px auto 0;
    border-radius: 1px;
    background: linear-gradient(90deg, #0894FF 0%, #BD32D6 50%, #FFA304 100%);
}

/* ── State screens (loading / not found / signed) ──────── */

.cs-state {
    max-width: 560px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.cs-state__spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 16px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: cs-spin 0.9s linear infinite;
}

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

.cs-state__icon {
    font-size: 40px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.cs-state__icon--ok {
    color: #1F9D55;
}

.cs-state__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.cs-state__text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.cs-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Cards ─────────────────────────────────────────────── */

.cs-card {
    max-width: 720px;
    margin: 0 auto var(--space-lg);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Eyebrow pill - same visual language as .contact-eyebrow. */
.cs-card__eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.18);
    border-radius: var(--radius-full);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.cs-card__title {
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 600;
    color: var(--text-color);
}

/* ── Course card ───────────────────────────────────────── */

.cs-course {
    text-align: center;
}

.cs-course__logo-wrap {
    display: flex;
    justify-content: center;
}

/* Logo10x / Logo10xArchitect render as a bare <svg>; Logo10xCourse renders a
   .logo-10x-course wrapper whose inner svg is height:100% - both size off a
   fixed height here. */
.cs-course__logo {
    height: 42px;
    width: auto;
}

.cs-course__logo-course {
    height: 46px;
}

.cs-course__form-label {
    margin-top: 10px;
    font-size: 15px;
    color: var(--text-secondary);
}

/* Locked amount rows */

.cs-locked {
    margin-top: var(--space-lg);
    text-align: right;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cs-locked__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #F9FBFF;
    border-bottom: 1px solid var(--border-light);
}

.cs-locked__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 150px;
}

.cs-locked__value {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-color);
}

/* List price (מחיר מחירון) when a discount applies - struck through, muted. */
.cs-locked__value--list {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 14px;
}

/* No-payment-at-signing note (D11) replaces the "collected now" row. */
.cs-locked__row--note {
    background: #FBFCFE;
}

.cs-locked__note {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.cs-locked__icon {
    margin-inline-start: auto;
    font-size: 13px;
    color: #8E8F9E;
}

/* ── Form layout ───────────────────────────────────────── */

.cs-form .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.cs-address-row {
    grid-template-columns: 2fr 1.2fr 0.8fr;
}

/* ── Embedded credit-card payment (Telepay) ────────────── */

.cs-pay-frame__hint {
    margin: 0 0 var(--space-sm);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.cs-pay-frame__box {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

.cs-pay-frame__iframe {
    display: block;
    width: 100%;
    height: 1150px;
    border: 0;
}

@media (max-width: 767px) {
    .cs-pay-frame__iframe {
        height: 1320px;
    }
}

/* ── Terms ─────────────────────────────────────────────── */

.cs-terms {
    margin: 0 0 var(--space-md);
    padding: var(--space-md) var(--space-lg);
    padding-right: 34px;
    max-height: 340px;
    overflow-y: auto;
    background: #F9FBFF;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    list-style: disc;
}

.cs-terms__item {
    margin-bottom: 12px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.cs-terms__sub {
    margin: 6px 0 0;
    padding-right: 22px;
    list-style: circle;
}

.cs-terms__sub li {
    margin-bottom: 4px;
}

.cs-consent {
    margin-top: 4px;
}

.cs-consent--error .consent__text {
    color: #D64545;
}

.cs-consent--error .consent__checkbox {
    accent-color: #D64545;
    /* box-shadow, not outline - outline would suppress the UA focus ring. */
    box-shadow: 0 0 0 1.5px #D64545;
    border-radius: 3px;
}

/* ── Signature ─────────────────────────────────────────── */

.cs-signature-hint {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.signature-pad {
    position: relative;
    height: 190px;
    border: 1.5px dashed var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    transition: border-color 0.15s ease;
}

.signature-pad:hover {
    border-color: var(--primary-border);
}

.signature-pad--error,
.signature-pad--error:hover {
    border-color: #D64545;
}

.signature-pad__canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    /* Drawing surface: stop the browser from panning while signing. */
    touch-action: none;
    cursor: crosshair;
}

.signature-pad__hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #B4BAC9;
    pointer-events: none;
    user-select: none;
}

.signature-pad__clear {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    padding: 5px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.signature-pad__clear:hover {
    color: var(--text-color);
    border-color: var(--primary-border);
}

/* ── Submit ────────────────────────────────────────────── */

.cs-submit {
    width: 100%;
    margin-top: var(--space-lg);
}

.cs-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cs-submit-note {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    color: #8E8F9E;
}

/* ── Footer ────────────────────────────────────────────── */

.cs-footer {
    max-width: 720px;
    margin: var(--space-2xl) auto 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 12.5px;
    color: #8E8F9E;
}

.cs-footer a {
    color: #8E8F9E;
    text-decoration: none;
}

.cs-footer a:hover {
    color: var(--text-secondary);
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 1024px) {
    .cs-header__title {
        font-size: 27px;
    }
}

@media (max-width: 767px) {
    .contract-sign {
        padding: 0 var(--space-sm) var(--space-xl);
    }

    .cs-summary {
        margin: 0 calc(-1 * var(--space-sm));
    }

    .cs-summary__inner {
        font-size: 13px;
        gap: 8px;
    }

    .cs-header {
        padding-top: var(--space-lg);
    }

    .cs-header__title {
        font-size: 23px;
    }

    .cs-card {
        padding: var(--space-md);
    }

    .cs-form .field-row,
    .cs-address-row {
        grid-template-columns: 1fr;
    }

    .cs-course__logo {
        height: 36px;
    }

    .cs-course__logo-course {
        font-size: 27px;
    }

    .cs-locked__row {
        flex-wrap: wrap;
    }

    .cs-locked__label {
        min-width: 0;
        flex-basis: 100%;
    }

    .signature-pad {
        height: 170px;
    }
}
