/* ===========================================================================
   ikh-signin-modal.css   (v2 — adds journey-type grid, premium Google,
                                 terms checkbox, premium two-line button)
   ---------------------------------------------------------------------------
   This REPLACES your existing ikh-signin-modal.css. Everything from v1 is
   preserved — new pieces appended at the end and a couple of selectors
   tightened so the journey radio cards look at home next to the rest.
   =========================================================================== */

.ikh-modal {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: 'Outfit', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #0e0e11;
}

    .ikh-modal[hidden] {
        display: none !important;
    }

    .ikh-modal *, .ikh-modal *::before, .ikh-modal *::after {
        box-sizing: border-box;
    }

.ikh-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14,14,17,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ikh-modal-shell {
    position: relative;
    width: min(460px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 80px -16px rgba(14,14,17,0.4), 0 4px 12px rgba(14,14,17,0.06);
    padding: 0;
    animation: ikhModalIn .25s cubic-bezier(.21,.86,.36,1.04);
}

@keyframes ikhModalIn {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Header ──────────────────────────────────────────────────────────── */
.ikh-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 12px;
}

.ikh-modal-head-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #0e0e11;
}

.ikh-modal-brand-mark {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #F58220, #E8740F);
    color: white;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(245,130,32,0.35);
}

.ikh-modal-brand-text {
    letter-spacing: -0.01em;
}

.ikh-modal-close {
    appearance: none;
    border: 0;
    background: rgba(14,14,17,0.05);
    color: #0e0e11;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

    .ikh-modal-close:hover {
        background: rgba(14,14,17,0.1);
    }

/* ── Tabs ────────────────────────────────────────────────────────────── */
.ikh-modal-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 22px;
    background: linear-gradient(135deg, rgba(255,243,232,0.7), rgba(255,228,196,0.5));
    border-radius: 11px;
    border: 1px solid rgba(245,130,32,0.18);
}

.ikh-modal-tab {
    flex: 1;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 9px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: #6B3A0F;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

    .ikh-modal-tab.is-active {
        background: #ffffff;
        color: #0e0e11;
        font-weight: 600;
        box-shadow: 0 2px 6px rgba(14,14,17,0.06);
    }

/* ── Body ────────────────────────────────────────────────────────────── */
.ikh-modal-body {
    padding: 16px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Premium Google button (v2 redesign) ─────────────────────────────── */
.ikh-google-btn {
    appearance: none;
    border: 1px solid rgba(14,14,17,0.16);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    color: #0e0e11;
    padding: 12px 14px 12px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
    position: relative;
    overflow: hidden;
}

    .ikh-google-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(245,130,32,0.06), transparent);
        transition: left 0.6s ease;
    }

    .ikh-google-btn:hover {
        background: #ffffff;
        border-color: rgba(245,130,32,0.4);
        box-shadow: 0 6px 18px rgba(245,130,32,0.18);
        transform: translateY(-1px);
    }

        .ikh-google-btn:hover::before {
            left: 100%;
        }

    .ikh-google-btn:active {
        transform: translateY(0);
    }

.ikh-google-mark {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(14,14,17,0.06), inset 0 0 0 1px rgba(14,14,17,0.04);
}

.ikh-google-label {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ikh-google-title {
    font-weight: 600;
    font-size: 14px;
    color: #0e0e11;
    line-height: 1.2;
}

.ikh-google-sub {
    font-weight: 400;
    font-size: 11.5px;
    color: #7a7e8c;
    letter-spacing: 0.01em;
}

.ikh-google-arrow {
    color: #7a7e8c;
    transition: transform .18s ease, color .18s ease;
}

.ikh-google-btn:hover .ikh-google-arrow {
    transform: translateX(3px);
    color: #F58220;
}

/* ── Divider ─────────────────────────────────────────────────────────── */
.ikh-modal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7a7e8c;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 4px 0;
}

    .ikh-modal-divider::before,
    .ikh-modal-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: rgba(14,14,17,0.08);
    }

/* ── Error strip ─────────────────────────────────────────────────────── */
.ikh-modal-error {
    background: #fef2f2;
    border: 1px solid rgba(239,68,68,0.2);
    color: #991b1b;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

    .ikh-modal-error[hidden] {
        display: none;
    }

/* ── Form ────────────────────────────────────────────────────────────── */
.ikh-modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .ikh-modal-form[hidden] {
        display: none;
    }

.ikh-modal-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ikh-modal-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ikh-modal-label {
    font-size: 12px;
    color: #4a4d57;
    font-weight: 500;
}

.ikh-modal-field input[type="text"],
.ikh-modal-field input[type="email"],
.ikh-modal-field input[type="tel"],
.ikh-modal-field input[type="password"] {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(14,14,17,0.14);
    border-radius: 10px;
    background: #ffffff;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: #0e0e11;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ikh-modal-field input:focus {
    outline: 0;
    border-color: #F58220;
    box-shadow: 0 0 0 3px rgba(245,130,32,0.18);
}

.ikh-modal-hint {
    font-size: 11.5px;
    color: #7a7e8c;
    margin-top: 2px;
}

/* ── Input with leading icon (digital-jewelry style — matches agent flow) ──
   .ikh-modal-input wraps an .ikh-modal-input-icon + the <input>. The icon
   is absolutely positioned at the left edge; the input gets extra left
   padding so the text never collides with the glyph. The icon color
   tracks the input's focus state — neutral grey at rest, brand orange
   when the field is focused. */
.ikh-modal-input {
    position: relative;
    display: flex;
    align-items: stretch;
}

.ikh-modal-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7a7e8c;
    pointer-events: none;
    z-index: 1;
    transition: color .15s ease;
}
/* Override left padding for any input that lives inside the wrapper. The
   wrapper > selector keeps this scoped — bare inputs without the wrapper
   keep their original 12px padding on both sides. */
.ikh-modal-input > input[type="text"],
.ikh-modal-input > input[type="email"],
.ikh-modal-input > input[type="tel"],
.ikh-modal-input > input[type="password"] {
    padding-left: 38px;
}
/* Icon turns brand orange when the sibling input is focused. */
.ikh-modal-input:focus-within .ikh-modal-input-icon {
    color: #F58220;
}

/* ── Submit button ───────────────────────────────────────────────────── */
.ikh-modal-submit {
    appearance: none;
    border: 0;
    background: linear-gradient(135deg, #0e0e11 0%, #1f1f24 100%);
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 11px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
    box-shadow: 0 4px 14px rgba(14,14,17,0.18);
}

    .ikh-modal-submit:hover {
        background: linear-gradient(135deg, #1a1a1f 0%, #2a2a30 100%);
        box-shadow: 0 8px 22px rgba(14,14,17,0.28);
    }

    .ikh-modal-submit:active {
        transform: translateY(1px);
    }

    .ikh-modal-submit:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

    .ikh-modal-submit .ikh-modal-spin {
        width: 14px;
        height: 14px;
        border: 2px solid rgba(255,255,255,0.4);
        border-top-color: #ffffff;
        border-radius: 50%;
        display: none;
        animation: ikhSpin .8s linear infinite;
    }

    .ikh-modal-submit.is-loading .ikh-modal-submit-label {
        opacity: 0.6;
    }

    .ikh-modal-submit.is-loading .ikh-modal-spin {
        display: inline-block;
    }

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

.ikh-modal-foot {
    margin-top: 4px;
    text-align: center;
    color: #7a7e8c;
    font-size: 11.5px;
    line-height: 1.5;
}

    .ikh-modal-foot a {
        color: #F58220;
        text-decoration: none;
        cursor: pointer;
    }

        .ikh-modal-foot a:hover {
            text-decoration: underline;
        }

/* Page-level: stop body scroll when modal is open */
body.ikh-modal-open {
    overflow: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ikh-modal-shell {
        animation: none;
    }

    .ikh-google-btn, .ikh-modal-submit, .ikh-google-arrow {
        transition: none;
    }

    .ikh-modal-spin {
        animation: none;
    }
}

/* =========================================================================
   v2 ADDITIONS — journey-type cards + terms checkbox
   ========================================================================= */

/* Journey type radio grid — three premium "I am a…" cards */
.ikh-journey-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 2px;
}

.ikh-journey-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px 10px;
    border: 1.5px solid rgba(14,14,17,0.12);
    border-radius: 11px;
    background: #ffffff;
    color: #4a4d57;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .15s ease;
    text-align: center;
    user-select: none;
}

    .ikh-journey-card:hover {
        border-color: rgba(245,130,32,0.45);
        background: rgba(245,130,32,0.02);
    }

    .ikh-journey-card input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }
    /* Modern browsers: :has() makes this CSS-only.
   Older browsers: fallback class .is-checked that can be added by JS. */
    .ikh-journey-card.is-checked,
    .ikh-journey-card:has(input:checked) {
        border-color: #F58220;
        background: linear-gradient(135deg, rgba(255,243,232,0.85), rgba(255,228,196,0.55));
        color: #0e0e11;
        box-shadow: 0 4px 14px rgba(245,130,32,0.18), inset 0 0 0 1px #F58220;
    }

.ikh-journey-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7a7e8c;
    transition: color .18s ease, transform .18s ease;
}

.ikh-journey-card:hover .ikh-journey-icon {
    color: #F58220;
}

.ikh-journey-card.is-checked .ikh-journey-icon,
.ikh-journey-card:has(input:checked) .ikh-journey-icon {
    color: #F58220;
    transform: scale(1.05);
}

.ikh-journey-title {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Terms checkbox */
.ikh-modal-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    color: #4a4d57;
    line-height: 1.5;
    cursor: pointer;
    margin-top: 2px;
    user-select: none;
}

    .ikh-modal-terms input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        margin-top: 1px;
        border: 1.5px solid rgba(14,14,17,0.25);
        border-radius: 5px;
        background: #ffffff;
        cursor: pointer;
        position: relative;
        transition: border-color .15s ease, background .15s ease;
    }

        .ikh-modal-terms input[type="checkbox"]:checked {
            background: #F58220;
            border-color: #F58220;
        }

            .ikh-modal-terms input[type="checkbox"]:checked::after {
                content: '';
                position: absolute;
                left: 5px;
                top: 1px;
                width: 5px;
                height: 10px;
                border: solid #ffffff;
                border-width: 0 2px 2px 0;
                transform: rotate(45deg);
            }

        .ikh-modal-terms input[type="checkbox"]:focus-visible {
            outline: 2px solid #F58220;
            outline-offset: 2px;
        }

    .ikh-modal-terms a {
        color: #F58220;
        text-decoration: none;
    }

        .ikh-modal-terms a:hover {
            text-decoration: underline;
        }

/* ── Mobile: collapse the journey grid to 1 column on very narrow screens */
@media (max-width: 380px) {
    .ikh-journey-grid {
        grid-template-columns: 1fr;
    }

    .ikh-modal-row-2 {
        grid-template-columns: 1fr;
    }
}
