/* Primera pantalla del formulario del cliente: aviso de privacidad + celular, código y «¿Quién es tu asesor?». */

/* Pantalla «Escribe tu celular»: el campo es lo principal; la casilla del aviso va justo debajo. */
.identity-entry-stage { padding-top: 8px; }
.identity-entry-stage .lead { margin-bottom: 18px; }
.identity-phone-field { margin: 0 0 14px; }
.gimsa-intake-root .stage .identity-phone-field .phone-group input { min-height: 64px; font-size: 23px; font-weight: 650; letter-spacing: .05em; }
.gimsa-intake-root .stage .identity-phone-field .phone-group input::placeholder { font-weight: 500; letter-spacing: .04em; }
.gimsa-intake-root .stage .identity-phone-field .phone-prefix { font-size: 17px; }

.gimsa-intake-root .stage .consent.identity-consent { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 6px 2px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; cursor: pointer; }
.gimsa-intake-root .stage .consent.identity-consent input { width: 26px; height: 26px; flex: 0 0 26px; margin: 0; }
.gimsa-intake-root .stage .consent.identity-consent input:focus-visible { outline: 3px solid rgba(7, 94, 184, .35); outline-offset: 2px; }
.gimsa-intake-root .stage .consent.identity-consent.invalid { border: 0; box-shadow: none; }
.gimsa-intake-root .stage .consent.identity-consent.invalid input { outline: 2px solid #c94747; outline-offset: 2px; }
.gimsa-intake-root .stage .consent.identity-consent.invalid b { color: #b53232; }
.identity-consent-text { display: flex; min-width: 0; flex-direction: column; gap: 3px; padding-top: 2px; }
.identity-consent-text b { color: #17324e; font-size: 15px; font-weight: 700; line-height: 1.35; }
.identity-consent-text small { color: #63778a; font-size: 13px; font-weight: 500; line-height: 1.4; }
.identity-privacy-link { padding: 0; border: 0; background: none; color: #075eb8; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.identity-advisor-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; padding: 10px; color: #315b86; font-size: 14px; font-weight: 650; text-align: center; text-decoration: none; }
.identity-advisor-link i { flex: 0 0 auto; font-size: 18px; }
.identity-advisor-link:hover { text-decoration: underline; }

.identity-staff-search { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px; border: 1px dashed #b9cde0; border-radius: 12px; background: #f8fbfd; color: #315b86; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.identity-staff-search i { font-size: 17px; }
.identity-staff-search small { padding: 2px 7px; border-radius: 999px; background: #e6eef6; color: #5c7186; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.identity-staff-search:hover { border-color: #7fb4e6; background: #f1f7fd; }

.identity-back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0 0 12px; padding: 6px 10px 6px 4px; border: 0; background: transparent; color: #315b86; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.identity-back-link i { font-size: 19px; }

.identity-phone-summary { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; padding: 11px 12px 11px 14px; border: 1px solid #dce6f1; border-radius: 16px; background: #f7faff; }
.identity-phone-summary-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #e4efff; color: #075eb8; font-size: 20px; }
.identity-phone-summary-copy { display: flex; min-width: 0; flex-direction: column; }
.identity-phone-summary-copy small { color: #63778a; font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
.identity-phone-summary-copy b { color: #17324e; font-size: 17px; letter-spacing: .02em; }
.identity-change-phone { min-height: 40px; margin-left: auto; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #075eb8; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }
.identity-change-phone:hover { background: #e4efff; }

.identity-code { display: flex; gap: 10px; }
.identity-code input { flex: 1 1 auto; min-width: 0; min-height: 62px; padding: 10px 14px; border: 1.5px solid #c9d8e8; border-radius: 16px; background: #fff; color: #17324e; font-size: 27px; font-weight: 750; letter-spacing: .32em; text-align: center; outline: none; }
.identity-code input::placeholder { color: #a7b6c5; font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.identity-code input:focus { border-color: #075eb8; box-shadow: 0 0 0 4px rgba(7, 94, 184, .12); }
.identity-code-submit { flex: 0 0 auto; min-height: 62px; padding: 0 22px; border: 0; border-radius: 16px; background: #075eb8; color: #fff; font: inherit; font-size: 15px; font-weight: 750; cursor: pointer; }
.identity-code-submit:hover { background: #00498f; }
.identity-code-submit:disabled { opacity: .6; cursor: wait; }
.identity-code-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.identity-code-links .phone-verification-link { margin-left: 0; padding-left: 2px; }
.identity-verify-stage .phone-verification-error { margin-top: 10px; font-size: 13px; }
.identity-code-links .phone-verification-link:disabled { color: #8a9bad; cursor: default; text-decoration: none; }

/* «¿No lo recibes? Prueba con SMS»: para clientes sin WhatsApp (o al revés). */
.identity-fallback { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border: 1px solid #dce6f1; border-radius: 16px; background: #f7faff; }
.identity-fallback-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #e4efff; color: #075eb8; font-size: 21px; }
.identity-fallback-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 2px; }
.identity-fallback-copy b { color: #17324e; font-size: 14px; }
.identity-fallback-copy small { color: #63778a; font-size: 12px; font-weight: 500; line-height: 1.4; }
.identity-fallback-btn { flex: 0 0 auto; min-height: 44px; padding: 8px 14px; border: 1.5px solid #075eb8; border-radius: 12px; background: #fff; color: #075eb8; font: inherit; font-size: 14px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.identity-fallback-btn:hover:not(:disabled) { background: #e4efff; }
.identity-fallback-btn:disabled { border-color: #c9d8e8; color: #8a9bad; cursor: default; }
@media (max-width: 430px) {
    .identity-fallback { flex-wrap: wrap; }
    .identity-fallback-btn { width: 100%; }
}
.identity-whatsapp { margin-top: 14px; }

.identity-actions { display: grid; gap: 10px; margin-top: 4px; }
.identity-primary,
.identity-secondary { min-height: 56px; padding: 12px 18px; border-radius: 16px; font: inherit; font-size: 16px; font-weight: 750; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .12s ease; }
.identity-primary { border: 0; background: #075eb8; color: #fff; box-shadow: 0 8px 20px rgba(7, 94, 184, .2); }
.identity-primary:hover { background: #00498f; }
.identity-secondary { border: 1.5px solid #c9d8e8; background: #fff; color: #17324e; }
.identity-secondary:hover { border-color: #7fb4e6; background: #f7faff; }
.identity-primary:active,
.identity-secondary:active { transform: scale(.985); }
.identity-primary:disabled,
.identity-secondary:disabled { opacity: .65; cursor: wait; }

.identity-skip { display: block; min-height: 46px; margin: 18px auto 0; padding: 8px 14px; border: 0; background: transparent; color: #315b86; font: inherit; font-size: 15px; font-weight: 750; cursor: pointer; }
.identity-skip span { color: #63778a; font-weight: 550; }
.identity-skip:hover { text-decoration: underline; }

.identity-advisor-card { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 16px; border: 1px solid #dce6f1; border-radius: 18px; background: linear-gradient(140deg, #f7faff, #fff); }
.identity-option-avatar { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #e4efff; color: #075eb8; font-size: 18px; font-weight: 800; }
.identity-option-main { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 2px; }
.identity-option-main small { color: #63778a; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.identity-option-main b { color: #17324e; font-size: 16px; line-height: 1.3; }
.identity-option-main span { color: #4b6177; font-size: 13px; line-height: 1.4; }
.identity-option-main .identity-option-date { color: #7a8da0; font-size: 12px; }
.identity-option-main em { margin-top: 2px; color: #8a5a00; font-size: 12px; font-style: normal; font-weight: 650; }

.identity-question { margin: 2px 0 10px; color: #17324e; font-size: 17px; font-weight: 750; }
.identity-options { display: grid; gap: 10px; }
.identity-option { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px 14px 16px; border: 1.5px solid #d6e3ee; border-radius: 18px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease; }
.identity-option:hover { border-color: #7fb4e6; box-shadow: 0 10px 24px rgba(0, 54, 112, .1); }
.identity-option:active { transform: scale(.985); }
.identity-option:disabled { opacity: .7; cursor: wait; }
.identity-option > i { margin-left: auto; color: #7a8da0; font-size: 24px; }
.identity-secondary-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.identity-secondary-actions .identity-secondary { flex: 1 1 160px; min-height: 50px; font-size: 15px; }

/* Paso de datos: «Confirmado» flota dentro del campo de celular y no ocupa alto. */
.gimsa-intake-root .stage .phone-field.is-phone-confirmed .phone-group { position: relative; }
.gimsa-intake-root .stage .phone-field.is-phone-confirmed .phone-group input { padding-right: 124px; }
.phone-confirmed-tag { position: absolute; top: 50%; right: 14px; display: inline-flex; align-items: center; gap: 5px; color: #177450; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; pointer-events: none; transform: translateY(-50%); }
.phone-confirmed-tag i { font-size: 17px; }

@media (min-width: 520px) {
    .identity-match-stage .identity-actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .identity-primary,
    .identity-secondary,
    .identity-option { transition: none; }
}

/* Indicador de carga dentro del campo (a la derecha): con el teclado abierto en iPhone no se ve el de la pantalla,
   así que el campo mismo muestra que se está validando el celular o el código. */
.input-loader {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    border: 3px solid rgba(0, 104, 215, .18);
    border-top-color: #0068d7;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
    animation: inputLoaderSpin .7s linear infinite;
}
.input-loader.is-busy,
.input-loader.is-loading { opacity: 1; visibility: visible; }
.gimsa-intake-root .stage .identity-phone-field .phone-group { position: relative; }
.gimsa-intake-root .stage .identity-phone-field .phone-group input { padding-right: 52px; }
.identity-code-field { position: relative; display: flex; flex: 1 1 auto; min-width: 0; }
.identity-code-field input { padding-right: 52px; }
@keyframes inputLoaderSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .input-loader { animation-duration: 1.6s; } }
