/* ============================================================
   Asistente de perfil del abogado — ocho pasos, un pop-up.

   Hereda el lenguaje visual del pop-up de alta (aw-signup): mismo
   carbón, mismo lila, mismas esquinas, misma entrada. Cambia la caja,
   que aquí es más ancha porque hay formulario dentro, y gana cabecera
   de progreso y pie de navegación fijos.

   Igual que aquel, se imprime en páginas que no controlamos (landings,
   panel), así que NO depende de las variables de ningún wrapper: los
   tokens viven en `.aw-onb`.

   Por la misma razón, los selectores de botones, enlaces y campos van
   DOBLADOS (`.aw-onb .aw-onb__cta`). No es adorno: el panel del abogado
   normaliza sus controles con `body.aw-dash button { padding:0; background:
   none; color:inherit; font:inherit }`, que con una sola clase gana por
   especificidad (0,1,2 contra 0,1,0) y dejaba el asistente sin botones —
   el mismo marcado se veía distinto en la landing y en el panel. Con dos
   clases (0,2,x) el diálogo se pinta igual en cualquier anfitrión. Si se
   añade una regla nueva sobre <button>, <a>, <input>, <select> o <textarea>,
   dóblala también.
   ============================================================ */

.aw-onb {
    --aw-ob-brand:    #807dfe;
    --aw-ob-deep:     #5e5be0;
    --aw-ob-carbon:   #12161b;
    --aw-ob-graphite: #232a32;
    --aw-ob-ink:      #111827;
    --aw-ob-muted:    #6b7280;
    --aw-ob-line:     #e6e4f2;
    --aw-ob-danger:   #b42318;
    --aw-ob-warn-bg:  #fffaeb;
    --aw-ob-warn-br:  #fedf89;
    --aw-ob-warn-tx:  #93370d;
    --aw-ob-ok:       #067647;
    --t:              .25s ease-in-out;

    position: fixed;
    inset: 0;
    /* Por encima del pop-up de alta (100002): el asistente lo releva. */
    z-index: 100003;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Visby', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.aw-onb.is-open { display: flex; }

/* El mismo modelo de caja en los dos anfitriones. Sin esto, el diálogo
   hereda el reset de la página que lo imprime y los mismos `padding` dan
   anchos distintos en la landing y en el panel. */
.aw-onb,
.aw-onb *,
.aw-onb *::before,
.aw-onb *::after { box-sizing: border-box; }

.aw-onb__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 19, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.aw-onb__card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: calc(100dvh - 40px);
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px -24px rgba(4, 8, 19, .55);
    animation: awOnbIn .28s cubic-bezier(.16, 1, .3, 1);
    overflow: hidden;
}
@keyframes awOnbIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .aw-onb__card { animation: none; } }

/* ── Cabecera ──────────────────────────────────────────────── */
.aw-onb__head {
    flex: none;
    padding: 20px 26px 14px;
    border-bottom: 1px solid var(--aw-ob-line);
}
.aw-onb__headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.aw-onb__eyebrow {
    margin: 0;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--aw-ob-deep);
}
.aw-onb .aw-onb__close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    color: #555;
    cursor: pointer;
    transition: all var(--t);
}
.aw-onb .aw-onb__close:hover { background: rgba(0, 0, 0, .12); color: var(--aw-ob-ink); }

/* Ocho marcas: dónde estoy y cuánto queda, sin contar. */
.aw-onb__dots { display: flex; gap: 5px; margin-top: 12px; }
.aw-onb__dot {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: var(--aw-ob-line);
    transition: background var(--t);
}
.aw-onb__dot.is-done    { background: var(--aw-ob-brand); }
.aw-onb__dot.is-current { background: var(--aw-ob-carbon); }

/* ── Cuerpo ────────────────────────────────────────────────── */
.aw-onb__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 26px 6px;
}

.aw-onb__title {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--aw-ob-ink);
}
.aw-onb__sub {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--aw-ob-muted);
}
.aw-onb__hint {
    margin: 6px 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--aw-ob-muted);
}
.aw-onb__count {
    margin: -4px 0 0;
    text-align: right;
    font-size: 11.5px;
    color: var(--aw-ob-muted);
}

/* La alerta de paso incompleto: informa, no bloquea. */
.aw-onb__warn {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 15px;
    padding: 10px 13px;
    border: 1px solid var(--aw-ob-warn-br);
    border-radius: 12px;
    background: var(--aw-ob-warn-bg);
    color: var(--aw-ob-warn-tx);
    font-size: 12.5px;
    line-height: 1.45;
}
.aw-onb__warn svg { flex: none; margin-top: 1px; }

.aw-onb__notice {
    margin: 0 0 14px;
    padding: 11px 14px;
    border: 1px solid #fecdca;
    border-radius: 12px;
    background: #fef3f2;
    color: var(--aw-ob-danger);
    font-size: 12.5px;
    line-height: 1.45;
}

/* ── Campos ────────────────────────────────────────────────── */
.aw-onb__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.aw-onb__field > span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--aw-ob-muted);
}
.aw-onb__field > span strong { color: var(--aw-ob-deep); font-size: 13px; }

.aw-onb .aw-onb__field input[type="text"],
.aw-onb .aw-onb__field input[type="number"],
.aw-onb .aw-onb__field select,
.aw-onb .aw-onb__field textarea,
.aw-onb .aw-onb__row input {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--aw-ob-line);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--aw-ob-ink);
    outline: none;
    transition: border-color var(--t);
}
.aw-onb .aw-onb__field textarea { resize: vertical; line-height: 1.55; }
.aw-onb__field input::placeholder,
.aw-onb__row input::placeholder,
.aw-onb__field textarea::placeholder { color: #9aa0b0; }
.aw-onb .aw-onb__field input:focus,
.aw-onb .aw-onb__field select:focus,
.aw-onb .aw-onb__field textarea:focus,
.aw-onb .aw-onb__row input:focus { border-color: var(--aw-ob-brand); }

.aw-onb__row { display: grid; gap: 10px; margin-bottom: 12px; }
.aw-onb__row--2 { grid-template-columns: 1fr 1fr; }
.aw-onb__row--3 { grid-template-columns: 96px 1fr 1fr; }
.aw-onb__row .aw-onb__field { margin-bottom: 0; }

/* ── Foto ──────────────────────────────────────────────────── */
.aw-onb__photo { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.aw-onb__avatar {
    flex: none;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid var(--aw-ob-line);
    background: #f6f6fa;
    color: #9aa0b0;
    overflow: hidden;
}
.aw-onb__avatar img { width: 100%; height: 100%; object-fit: cover; }
.aw-onb .aw-onb__filebtn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 11px;
    background: var(--aw-ob-carbon);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--t);
}
.aw-onb .aw-onb__filebtn:hover { background: var(--aw-ob-graphite); }
.aw-onb__photo .aw-onb__hint { margin: 7px 0 0; }

/* ── Chips ─────────────────────────────────────────────────── */
.aw-onb__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.aw-onb .aw-onb__chip {
    padding: 7px 13px;
    border: 1.5px solid var(--aw-ob-line);
    border-radius: 99px;
    background: #fff;
    color: var(--aw-ob-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
}
.aw-onb .aw-onb__chip:hover { border-color: var(--aw-ob-brand); }
.aw-onb .aw-onb__chip.is-active {
    background: var(--aw-ob-carbon);
    border-color: var(--aw-ob-carbon);
    color: #fff;
}
/* Tope alcanzado: lo que no se puede elegir se ve que no se puede. */
.aw-onb .aw-onb__chip[disabled] { opacity: .4; cursor: not-allowed; }

/* ── Sliders ───────────────────────────────────────────────── */
.aw-onb .aw-onb__slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 99px;
    background: var(--aw-ob-line);
    outline: none;
}
.aw-onb__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: var(--aw-ob-brand);
    cursor: pointer;
}
.aw-onb__slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: var(--aw-ob-brand);
    cursor: pointer;
}
/* La tarifa se lee como en el panel: pesos grandes arriba, neto debajo. */
.aw-onb__rate-label {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 15px !important;
    color: var(--aw-ob-ink) !important;
}
.aw-onb__rate-label strong {
    font-size: 19px;
    color: var(--aw-ob-deep);
}
.aw-onb__earn {
    margin: 2px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--aw-ob-deep);
}
.aw-onb__ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--aw-ob-muted);
}
.aw-onb__explain {
    margin: 4px 0 10px;
    padding: 13px 15px;
    border-radius: 12px;
    background: rgba(128, 125, 254, .1);
    font-size: 13px;
    line-height: 1.6;
    color: var(--aw-ob-ink);
}
.aw-onb__explain p { margin: 0 0 8px; }
.aw-onb__explain p:last-child { margin: 0; }
.aw-onb__explain strong { color: var(--aw-ob-deep); }

/* ── Formación académica ───────────────────────────────────── */
.aw-onb__edu .aw-onb__row:last-child { margin-bottom: 0; }

.aw-onb__extra {
    position: relative;
    margin-bottom: 10px;
    padding: 13px 38px 3px 13px;
    border: 1.5px solid var(--aw-ob-line);
    border-radius: 14px;
    background: #fbfbfd;
}
.aw-onb__extra .aw-onb__row:last-child { margin-bottom: 0; }
.aw-onb .aw-onb__extra-del {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    color: var(--aw-ob-muted);
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--t);
}
.aw-onb .aw-onb__extra-del:hover { background: #fef3f2; color: var(--aw-ob-danger); }

.aw-onb .aw-onb__add {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed var(--aw-ob-line);
    border-radius: 12px;
    background: #fff;
    color: var(--aw-ob-deep);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t);
}
.aw-onb .aw-onb__add:hover { border-color: var(--aw-ob-brand); background: rgba(128, 125, 254, .06); }

/* ── Horario ───────────────────────────────────────────────── */
.aw-onb__avail { display: flex; flex-direction: column; gap: 7px; }
.aw-onb__day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1.5px solid var(--aw-ob-line);
    border-radius: 12px;
    transition: opacity var(--t);
}
.aw-onb__day.is-off { opacity: .5; }
.aw-onb__day-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--aw-ob-ink); cursor: pointer; }
.aw-onb .aw-onb__day-name input { width: 16px; height: 16px; accent-color: var(--aw-ob-brand); cursor: pointer; }
.aw-onb__day-times { display: flex; align-items: center; gap: 6px; color: var(--aw-ob-muted); font-size: 12px; }
.aw-onb .aw-onb__day-times input {
    padding: 6px 8px;
    border: 1.5px solid var(--aw-ob-line);
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    color: var(--aw-ob-ink);
}

/* ── Cierre ────────────────────────────────────────────────── */
.aw-onb__tick {
    width: 54px;
    height: 54px;
    margin: 0 0 14px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: rgba(6, 118, 71, .1);
    color: var(--aw-ob-ok);
}
.aw-onb__done-title {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--aw-ob-ink);
}
.aw-onb__pending {
    margin: 0 0 18px;
    padding: 13px 15px;
    list-style: none;
    border: 1px solid var(--aw-ob-warn-br);
    border-radius: 12px;
    background: var(--aw-ob-warn-bg);
    color: var(--aw-ob-warn-tx);
    font-size: 12.5px;
    line-height: 1.7;
}
.aw-onb__pending li::before { content: '· '; font-weight: 800; }
.aw-onb__pending[hidden] { display: none; }

/* ── Botones ───────────────────────────────────────────────── */
.aw-onb .aw-onb__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 22px;
    border: 0;
    border-radius: 14px;
    background: var(--aw-ob-carbon);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--t);
}
.aw-onb .aw-onb__cta:hover { background: var(--aw-ob-graphite); color: #fff; }
.aw-onb .aw-onb__cta:disabled { opacity: .65; cursor: progress; }
.aw-onb__done .aw-onb__cta { width: 100%; }

.aw-onb .aw-onb__ghost {
    padding: 11px 18px;
    border: 1.5px solid var(--aw-ob-line);
    border-radius: 14px;
    background: #fff;
    color: var(--aw-ob-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
}
.aw-onb .aw-onb__ghost:hover { background: #f6f6fa; border-color: var(--aw-ob-brand); }
.aw-onb .aw-onb__ghost[hidden] { display: none; }
.aw-onb__done .aw-onb__ghost { width: 100%; margin-top: 9px; }

/* ── Pie ───────────────────────────────────────────────────── */
.aw-onb__foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 26px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--aw-ob-line);
    background: #fff;
}
.aw-onb__foot[hidden] { display: none; }
.aw-onb .aw-onb__cta--next { margin-left: auto; }
.aw-onb__saving {
    font-size: 12px;
    color: var(--aw-ob-muted);
}

/* ── Móvil: hoja desde abajo, igual que el pop-up de alta ──── */
@media (max-width: 560px) {
    .aw-onb { padding: 0; align-items: flex-end; }
    .aw-onb__card {
        width: 100%;
        max-height: 94dvh;
        border-radius: 22px 22px 0 0;
    }
    .aw-onb__head { padding: 16px 18px 12px; }
    .aw-onb__body { padding: 16px 18px 4px; }
    .aw-onb__foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
    .aw-onb__row--3 { grid-template-columns: 1fr 1fr; }
    .aw-onb__row--3 .aw-onb__field--sm { grid-column: 1 / -1; }
    .aw-onb__title { font-size: 19px; }
    .aw-onb__day { flex-direction: column; align-items: flex-start; gap: 7px; }
    .aw-onb .aw-onb__ghost, .aw-onb .aw-onb__cta { padding: 11px 15px; font-size: 13.5px; }
}
