/* trial3.css — Cadastro Winchat v3 (SSO + página única). Layout próprio,
   diferente do sidebar usado em /trial e /trial2. Reaproveita tokens de
   signin.css (carregado antes). Prefixo t3-*, para não colidir com au-*. */

:root {
    --t3-tint:      rgba(23,104,255,.06);
    --t3-tint-bord: rgba(23,104,255,.12);
    --t3-heading:   #1c3264;
    --blue-900: rgb(30, 58, 138);
    /* Medidos pixel a pixel no arquivo de referência; variáveis porque
       .t3-header e .t3-layout precisam da MESMA conta pra alinhar. */
    --t3-pad:    clamp(20px, 6vw, 120px);
    --t3-gap-w:  clamp(32px, calc(25vw - 290px), 400px);
    --t3-card-w: min(clamp(400px, calc(49vw - 90px), 1400px), calc(var(--t3-gap-w) + 520px));
    --t3-content-w: calc(var(--t3-card-w) + var(--t3-gap-w) + 520px + 2 * var(--t3-pad));
}
html.au-dark {
    --t3-tint:      rgba(23,104,255,.10);
    --t3-tint-bord: rgba(23,104,255,.22);
    --t3-heading:   #FFFFFF;
}

.t3-page {
    font-family: var(--f);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background: var(--form-bg);
    color: var(--t1);
}

/* ─── Header ── */
.t3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 24px clamp(20px, 6vw, 120px);
    width: 100%;
}
.t3-header__logo img { width: 150px; height: auto; }
html.au-dark .t3-header__logo img { filter: brightness(0) invert(1); }
.t3-header__nav { display: flex; align-items: center; gap: 24px; }
.t3-header__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--t2);
    text-decoration: none;
}
.t3-header__back:hover { color: var(--t1); }
.t3-header__cta { font-size: 15px; color: var(--t2); }
.t3-header__cta a { color: var(--blue, #1768FF); font-weight: 600; text-decoration: none; }
.t3-header__cta a:hover { text-decoration: underline; }

/* ─── Layout de 2 colunas ── */
.t3-layout {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(32px, 7vw, 140px);
    padding: 32px clamp(20px, 6vw, 120px) 48px;
    width: 100%;
    align-items: stretch;
}
.t3-pane { min-width: 0; }

/* ─── Painel esquerdo: ilustração + prova social ── */
.t3-showcase {
    display: none;
    flex: 1 0 380px;
    width: auto;
    max-width: var(--t3-card-w);
    background: #EEF4FF;
    border: none;
    border-radius: 28px;
    padding: 44px 36px 36px 36px;
    box-sizing: border-box;
}
html.au-dark .t3-showcase { background: var(--t3-tint); }
@media (min-width: 1120px) {
    /* align-self:flex-start, não stretch/center — os dois já testados e
       descartados (caixa quase quadrada / vão gigante em 4K). */
    .t3-showcase { display: flex; flex-direction: column; justify-content: flex-start; gap: 24px; align-items: center; align-self: flex-start; }
}

.t3-mockup-scaler {
    width: 100%;
    max-width: 500px;
    margin: auto 0 0 0;
    align-self: center;
    position: relative;
    aspect-ratio: 469 / 365;
    container-type: inline-size;
}
.t3-mockup-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 469px;
    height: 365px;
    transform-origin: top left;
    transform: scale(calc(100cqw / 469px));
}

.t3-proof { display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; margin-top: 12px; }
.t3-proof__title { font-size: 17px; font-weight: 700; color: var(--blue-900); margin: 0; }
html.au-dark .t3-proof__title { color: var(--t1); }
.t3-proof__logos { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.t3-proof__logo { height: 32px; width: 116px; display: flex; align-items: center; justify-content: center; }
.t3-proof__logo img {
    max-height: 26px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) opacity(.55);
    mix-blend-mode: multiply;
}
html.au-dark .t3-proof__logo img {
    filter: brightness(0) invert(1) opacity(.5);
    mix-blend-mode: screen;
}
.t3-copy { font-size: 13px; color: #8C99B2; text-align: center; margin-top: 16px; }
html.au-dark .t3-copy { color: var(--t2); }

.t3-proof, .t3-copy { transform: translateY(-14px); }
.t3-proof__logos { transform: translateY(10px); }

/* ─── Painel direito: formulário ── */
.t3-form-pane { flex: 999 1 0%; max-width: 520px; margin: 0 auto; width: 100%; }
.t3-heading {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.15;
    color: var(--blue-900);
    margin-bottom: 8px;
}
html.au-dark .t3-heading { color: var(--t1); }
.t3-subhead { font-size: 16px; color: var(--t2); margin-bottom: 24px; }

.t3-sso { display: flex; gap: 12px; flex-wrap: nowrap; width: 100%; margin-bottom: 16px; }
.t3-sso__btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 12px;
    background: #FFFFFF;
    border: 1.5px solid #E4E6EA;
    border-radius: 6px;
    font-family: var(--f);
    font-size: 14px;
    font-weight: 600;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
html.au-dark .t3-sso__btn { background: var(--input); border-color: var(--bord); box-shadow: none; }
.t3-sso__btn:hover { background: var(--input-hover); border-color: var(--bord-hover); }
/* Especificidade > ".t3-sso__btn:hover" por causa do "html.au-dark" acima. */
html.au-dark .t3-sso__btn:hover {
    background: #3A3A3A;
    border-color: rgba(23,104,255,.4);
}
.t3-sso__icon { flex-shrink: 0; }

@media (min-width: 1120px) and (max-width: 1220px) {
    .t3-sso__btn { font-size: 12px; padding: 0 6px; gap: 5px; }
    .t3-trust { gap: 14px; }
}

@media (min-width: 1120px) and (max-width: 1399px) {
    .t3-proof__logos { gap: 16px; }
    .t3-proof__logo { width: 96px; }
}

.t3-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--t3);
    font-size: 12px;
    margin-bottom: 24px;
}
.t3-divider::before, .t3-divider::after { content: ''; height: 1px; flex: 1; background: var(--bord); }

.t3-field { margin-bottom: 16px; }
.t3-label { display: block; font-size: 13px; font-weight: 600; color: var(--blue-900); margin-bottom: 6px; }
html.au-dark .t3-label { color: var(--label); }
.t3-input-wrap { position: relative; display: flex; align-items: center; }
.t3-input-wrap__icon {
    position: absolute; left: 18px;
    color: var(--t3);
    display: flex;
    pointer-events: none;
    font-size: 20px;
}
.t3-input {
    width: 100%;
    height: 60px;
    background: #FFFFFF;
    border: 1.5px solid #E4E6EA;
    border-radius: 16px;
    padding: 0 18px 0 48px;
    font-family: var(--f);
    font-size: 15px;
    color: #1A2236;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
html.au-dark .t3-input { background: var(--input); border-color: var(--bord); color: var(--t1); }
.t3-input::placeholder { color: #8A93A6; font-weight: 400; }
html.au-dark .t3-input::placeholder { color: var(--t3); }
.t3-input:hover:not(:focus) { border-color: var(--bord-hover); background: var(--input-hover); }
.t3-input:focus { border-color: var(--blue); background: var(--input-hover); box-shadow: 0 0 0 3px var(--focus-ring); }
/* Cobre o azul do autofill do Chrome (background não é sobrescrevível nesse estado).
   A transição de 9999s impede o fundo claro do Chrome de chegar a ser aplicado — sem
   ela, ao apagar/recortar o valor o campo animava (.15s) desse fundo claro de volta
   e "piscava" branco. */
.t3-input:-webkit-autofill,
.t3-input:-webkit-autofill:hover,
.t3-input:-webkit-autofill:focus {
    transition: background-color 9999s ease-out 0s;
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
    -webkit-text-fill-color: #1A2236;
    caret-color: #1A2236;
}
html.au-dark .t3-input:-webkit-autofill,
html.au-dark .t3-input:-webkit-autofill:hover,
html.au-dark .t3-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--input) inset;
    -webkit-text-fill-color: var(--t1);
    caret-color: var(--t1);
}
.t3-input--pw { padding-right: 56px; }
.t3-input--error { border-color: #ef4444 !important; }

.t3-eye {
    position: absolute; right: 10px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; color: var(--t3); cursor: pointer;
    font-size: 20px;
}
.t3-eye:hover { color: var(--t1); }

.t3-capslock {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    z-index: 2;
}
html.au-dark .t3-capslock { color: #FCD34D; background: rgba(180,83,9,.18); border-color: rgba(253,230,138,.25); }
.t3-capslock.active { display: flex; }

.t3-field__error {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ef4444;
    padding-left: 4px;
    margin-top: 6px;
}
.t3-field__error.active { display: flex; }
.t3-field__error i { font-size: 13px; flex-shrink: 0; }

.t3-pw-static-hint {
    font-size: 12px;
    line-height: 18px;
    color: var(--t3);
    margin-top: 6px;
}
.t3-pw-static-hint.hidden { display: none; }

.t3-pw-hint {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    /* Mesma caixa do .t3-pw-static-hint (6px + 18px): o foco troca um pelo outro e,
       com alturas diferentes, o card (centralizado na tela) se mexia. */
    min-height: 18px;
    margin-top: 6px;
}
.t3-pw-hint.active { display: flex; }

.t3-pw-rule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5A6478;
    transition: color .15s;
}
html.au-dark .t3-pw-rule { color: var(--t2); }
.t3-pw-rule.is-ok { color: #15803D; }
html.au-dark .t3-pw-rule.is-ok { color: var(--ok-text); }

.t3-pw-rule__dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    background: #E4E6EA;
    flex-shrink: 0;
    transition: background .15s;
}
html.au-dark .t3-pw-rule__dot { background: var(--bord); }
.t3-pw-rule.is-ok .t3-pw-rule__dot { background: #22C55E; }

.t3-pw-rule__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8A93A6;
}
.t3-pw-rule__icon--off {
    width: 6px;
    height: 2px;
    border-radius: 1px;
    background: #8A93A6;
}
.t3-pw-rule__icon--on {
    display: none;
    width: 8px;
    height: 8px;
    color: #FFFFFF;
}
.t3-pw-rule.is-ok .t3-pw-rule__icon--off { display: none; }
.t3-pw-rule.is-ok .t3-pw-rule__icon--on { display: block; }

.t3-terms { font-size: 13px; color: var(--t2); margin: 0 0 16px; line-height: 1.5; }
.t3-terms a { color: var(--blue, #1768FF); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.t3-submit {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 9999px;
    background: #2A50EB;
    color: #fff;
    font-family: var(--f);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 4px 14px var(--t3-tint-bord);
}
.t3-submit:hover { background: #2141C7; }
.t3-submit-wrap { width: 100%; }

.t3-login-link { display: none; }
.t3-login-link a { color: var(--blue, #1768FF); font-weight: 600; text-decoration: none; }
.t3-login-link a:hover { text-decoration: underline; }

.t3-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 24px;
    border-top: 1px solid #E4E6EA;
    font-size: 13px;
    color: var(--t2);
}
html.au-dark .t3-trust { border-top-color: var(--bord); }
.t3-trust span { display: inline-flex; align-items: center; gap: 6px; }
.t3-trust i { color: var(--blue, #1768FF); font-size: 16px; }
/* Especificidade >= ".t3-trust span" acima, senão o suffix nunca esconde. */
.t3-trust .t3-trust__suffix { display: none; }

/* ─── Mobile ── */
@media (max-width: 640px) {
    .t3-page { display: flex; flex-direction: column; }
    /* align-items:flex-start, não center — center abria um vão enorme em
       cima em telas altas, visível sem precisar rolar. */
    .t3-layout { flex: 1 1 auto; align-items: flex-start; padding: 0 20px; }

    .t3-header { padding: clamp(8px, 3vh, 28px) 20px; }
    .t3-header__logo img { width: clamp(112px, 16vh, 150px); }
    .t3-header__nav { display: none; }

    .t3-form-pane { max-width: none; width: 100%; }

    .t3-heading { font-size: 26px; line-height: 1.15; margin-bottom: clamp(4px, 1.2vh, 12px); }
    .t3-subhead { font-size: 14px; margin-bottom: clamp(10px, 3.2vh, 28px); }

    .t3-sso { flex-direction: column; gap: 8px; margin-bottom: clamp(8px, 2.6vh, 24px); }
    .t3-sso__btn { flex: none; width: 100%; height: 52px; font-size: 14px; padding: 0 12px; gap: 10px; }

    .t3-divider { color: #8A93A6; margin-bottom: clamp(8px, 2.3vh, 20px); }
    .t3-divider::before, .t3-divider::after { background: #E4E6EA; }

    /* font-size:16px obrigatório — abaixo disso o iOS dá zoom ao focar. */
    .t3-field { margin-bottom: clamp(10px, 2.4vh, 20px); }
    .t3-input { height: 52px; border-radius: 14px; padding-left: 46px; padding-right: 16px; font-size: 16px; }
    .t3-input--pw { padding-right: 54px; }
    .t3-input-wrap__icon { left: 16px; font-size: 18px; }
    .t3-eye { right: 6px; width: 40px; height: 40px; font-size: 17px; }

    .t3-terms { font-size: 12px; text-align: center; margin-bottom: clamp(8px, 2.2vh, 18px); }

    .t3-submit { height: 52px; }
    .t3-submit:hover { background: #0C52D6; }
    .t3-submit-wrap {
        position: sticky;
        bottom: 0;
        width: auto;
        background: #FFFFFF;
        margin: 0 -20px;
        padding: 4px 20px 8px;
        box-shadow: 0 -8px 12px rgba(255,255,255,.95);
        z-index: 2;
    }

    .t3-login-link { display: block; margin-top: clamp(8px, 2.4vh, 20px); text-align: center; font-size: 14px; color: #5A6478; }

    .t3-trust { display: none; }
}

/* ─── Mobile — dark mode ── */
@media (max-width: 640px) {
    html.au-dark .t3-divider { color: var(--t3); }
    html.au-dark .t3-divider::before,
    html.au-dark .t3-divider::after { background: var(--bord); }

    html.au-dark .t3-submit-wrap {
        background: var(--form-bg);
        box-shadow: 0 -8px 12px rgba(0,0,0,.35);
    }

    html.au-dark .t3-login-link { color: var(--t2); }

    html.au-dark .t3-trust {
        border-top-color: var(--bord);
        color: var(--t2);
    }
}

/* ─── Desktop (≥1120px): trava em 100vh sem encolher o formulário ── */
@media (min-width: 1120px) {
    /* overflow-y:auto é rede de segurança se o form passar da altura da tela. */
    html, .t3-page { height: 100%; overflow-y: auto; overflow-x: hidden; }
    .t3-page { display: flex; flex-direction: column; }
    .t3-header { flex: 0 0 auto; padding-top: clamp(10px, 3vh, 24px); padding-bottom: clamp(16px, 5vh, 48px); }

    .t3-form-pane { margin: 0; }
    .t3-header, .t3-layout { max-width: var(--t3-content-w); margin-inline: auto; }
    .t3-layout { gap: var(--t3-gap-w); }

    .t3-showcase { padding: clamp(20px, 5vh, 44px) clamp(20px, 4vh, 36px) clamp(20px, 4vh, 36px); }
    .t3-mockup-scaler { max-width: clamp(240px, 46vh, 600px); }
    .t3-proof { gap: clamp(8px, 2vh, 20px); margin-top: clamp(2px, 1vh, 12px); }
    .t3-proof__title { font-size: clamp(14px, 2vh, 17px); }
    .t3-copy { font-size: clamp(11px, 1.4vh, 13px); }

    .t3-layout {
        flex: 1 1 auto;
        min-height: 0;
        padding-top: clamp(24px, 4vh, 64px);
        padding-bottom: clamp(16px, 3vh, 48px);
        transform: translateY(-24px);
    }
    .t3-showcase, .t3-form-pane { max-height: 100%; }

    /* align-self:flex-start, não stretch — senão estica além do conteúdo real. */
    .t3-form-pane { display: flex; flex-direction: column; align-self: flex-start; }
    #t3Form { display: flex; flex-direction: column; }
    #t3TrialForm { margin-bottom: 16px; }
}

/* Depois do bloco acima de propósito (mesma especificidade, última vence). */
@media (min-width: 1120px) and (max-width: 1220px) {
    .t3-proof__title { font-size: 13.5px; }
}

@media (min-width: 1120px) and (max-height: 820px) {
    .t3-layout { padding-bottom: 16px; }
}

@media (min-width: 1120px) and (max-height: 560px) {
    .t3-mockup-scaler { display: none; }
    /* align-self:stretch aqui (diferente da regra base) — sem mockup a
       caixa fica curta; esticando, o vão sobra dentro dela, não ao lado. */
    .t3-showcase { justify-content: center; gap: 20px; align-self: stretch; }
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: -2px;
    animation: t3BtnSpin .7s linear infinite;
}
@keyframes t3BtnSpin { to { transform: rotate(360deg); } }
