/* Registro en una página (register_new.php), alta correcta (register_new_ok.php) y error
   en el alta (register_new_ko.php).
   Medidas del diseño de registro del sistema de diseño; campos, selectores, casillas,
   botones y enlaces son los componentes de components.css. */


/* REGISTRO
-------------------------------------------------- */

body.signup-new #content_home .form-wrapper {
  max-width: 623px;
  margin-top: 0;
  margin-bottom: 32px;
}

@media (max-width: 991px) {
  body.signup-new #content_home .form-wrapper {
    margin-bottom: 64px;
  }
}

.registro-nuevo h2.form-titulo,
.registro-nuevo p {
  margin: 0;
}

/* Small: 16/26 */
.registro-intro p,
.registro-acceder {
  color: var(--VV-Black, #1A1A1A);
  font-family: Poppins;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
}

.registro-intro p + p {
  margin-top: 26px;
}

.registro-acceder {
  text-align: center;
}

.registro-acceder .text-link {
  margin-left: 12px;
}

/* Separador «o» entre el alta con Google y el formulario */
.registro-separador {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--vv-text-disabled, #747474);
  font-family: Poppins;
  font-size: 14px;
  line-height: 21px;
}

.registro-separador::before,
.registro-separador::after {
  content: '';
  flex: 1 1 0;
  border-top: 1px solid var(--vv-border-subtle, #CDCDCD);
}

.registro-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Títulos de bloque (Datos personales / profesionales): SmallBold con la barra vertical */
.registro-seccion {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--VV-Black, #1A1A1A);
  font-family: Poppins;
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
}

.registro-seccion::before {
  content: '';
  flex: 0 0 auto;
  width: 2px;
  height: 20px;
  background: currentColor;
}

/* Pistas (número de docente, y motivo de las listas deshabilitadas o instrucción de la
   escuela): misma sangría que .helper-text y #passwordHint */
.registro-pista {
  padding-left: 15px;
}

/* Escuela: campo de texto con la flecha de los selectores (la lista de sugerencias se
   abre al escribir). La flecha es decorativa: el clic pasa al campo. */
.registro-escuela .form-floating > .form-control {
  padding-right: 44px;
}

.registro-escuela .form-floating i.bi.bi-caret-down-fill {
  pointer-events: none;
  color: var(--VV-Grey-600, #4D4D4D) !important;
}

.registro-escuela .form-floating > .form-control:hover ~ i.bi.bi-caret-down-fill,
.registro-escuela .form-floating > .form-control:focus ~ i.bi.bi-caret-down-fill {
  color: var(--VV-Black, #1A1A1A) !important;
}

/* Sugerencias de escuela (listbox del combobox): mismo panel que el desplegable de
   vv-multi. Por encima de los botones de vv-multi (z-index 20). */
.registro-combobox {
  position: relative;
}

.registro-sugerencias {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: 100%;
  max-height: 300px;
  margin: 0;
  padding: 12px 0;
  overflow-y: auto;
  list-style: none;
  background: var(--VV-White, #FFF);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
}

.registro-sugerencia,
.registro-sugerencia-vacia {
  padding: 12px 16px;
  color: var(--VV-Black, #1A1A1A);
  font-family: Poppins;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  overflow-wrap: anywhere;
}

.registro-sugerencia {
  cursor: pointer;
}

.registro-sugerencia:hover {
  background: var(--vv-ghost-hover-bg, #E4E4E4);
}

/* Sugerencia resaltada con las flechas (el foco sigue en el campo) */
.registro-sugerencia.activa {
  background: var(--vv-ghost-hover-bg, #E4E4E4);
  outline: 2px solid var(--vv-border-focus, #1D4ED8);
  outline-offset: -2px;
}

.registro-sugerencia-vacia {
  color: var(--VV-Grey-600, #4D4D4D);
}

/* Selectores con error (los input ya lo tienen en components.css) */
.registro-form select.error,
.registro-form .vv-multi-toggle.error {
  border: 1px solid var(--VV-State-Error, #E91628) !important;
}

.registro-form select.error ~ label,
.registro-form .form-floating-multi:has(.vv-multi-toggle.error) > label {
  color: var(--VV-State-Error, #E91628) !important;
}

/* Etiqueta en rojo sin la opacidad de 0,65 que Bootstrap pone a las etiquetas flotantes:
   con ella el rojo queda en #F16873 (3,01:1); sin ella, 4,55:1 (1.4.3) */
.registro-form .form-floating > .error ~ label,
.registro-form .form-floating-multi:has(.vv-multi-toggle.error) > label {
  opacity: 1;
}

/* Listas deshabilitadas hasta tener opciones: se siguen viendo la etiqueta y la flecha,
   en gris. style.css y components.css les dan fondo blanco, que en el select tapa la
   flecha y en el botón de vv-multi tapa también la etiqueta. */
.registro-form .form-floating > .form-select:disabled,
.registro-form .vv-multi-toggle:disabled {
  background-color: transparent !important;
}

.registro-form .form-floating-multi:has(.vv-multi-toggle:disabled) > label {
  color: var(--VV-Grey-300, #BFBFBF) !important;
}

.registro-form .form-floating-multi:has(.vv-multi-toggle:disabled) > i.bi.bi-caret-down-fill,
.registro-escuela .form-floating > .form-control:disabled ~ i.bi.bi-caret-down-fill {
  color: var(--vv-grey-300, #BFBFBF) !important;
}

/* Continuar mientras se valida y se envía (aria-busy): aspecto deshabilitado del UI Kit
   y el indicador de carga delante del texto */
.registro-form .cta[aria-busy="true"],
.registro-form .cta[aria-busy="true"]:hover,
.registro-form .cta[aria-busy="true"]:active {
  border: 2px solid var(--vv-disabled-bg) !important;
  background: var(--vv-disabled-bg) !important;
  color: var(--vv-disabled-content) !important;
  cursor: progress;
}


/* ALTA CORRECTA Y ERROR EN EL ALTA
-------------------------------------------------- */

/* 459 px a tamaño normal (raíz de 16 px); con el texto ampliado la tarjeta crece con él
   y el título y los botones no se salen (1.4.4) */
body.signup4ok-new .form-wrapper.registro-ok,
body.signup4ko-new .form-wrapper.registro-ok {
  max-width: max(459px, 28.6875rem);
  margin: 40px auto 80px;
  align-items: center;
  text-align: center;
}

@media (max-width: 991px) {
  body.signup4ok-new .form-wrapper.registro-ok,
  body.signup4ko-new .form-wrapper.registro-ok {
    margin: 64px auto;
  }
}

/* Icono de éxito: círculo Feedback/success/background-strong con el check en
   Feedback/success/content. Decorativo: el estado lo dice el h1. */
.registro-ok-icono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #22C55E;
}

.registro-ok-icono .bi {
  display: block;
  color: #052E16;
  font-size: 48px;
  line-height: 1;
}

/* El glifo de Bootstrap Icons va en línea con vertical-align: text-top, lo que
   alarga la caja del icono (58 px en vez de 48) y lo sube respecto al centro del
   círculo. Como bloque, la caja mide lo mismo que el glifo y queda centrado. */
.registro-ok-icono .bi::before {
  display: block;
  vertical-align: top;
}

/* Error: círculo Feedback/danger/background-strong con la cruz en
   Feedback/danger/content-inverse */
.registro-ko-icono {
  background: #DC2626;
}

.registro-ko-icono .bi {
  color: var(--VV-White, #FFF);
}

/* Enlace a soporte dentro del texto: negro y subrayado, como en el diseño */
.registro-ko .registro-ok-texto a {
  color: var(--VV-Black, #1A1A1A);
  text-decoration: underline;
}

.registro-ko .registro-ok-texto a:hover {
  text-decoration: none;
}

.registro-ko .registro-ok-texto a:focus-visible {
  outline: 2px solid var(--vv-border-focus, #1D4ED8);
  outline-offset: 2px;
  border-radius: 2px;
}

/* H3 del sistema de diseño: 36/42 */
.form-wrapper.registro-ok h1 {
  margin: 0;
  color: var(--VV-Black, #1A1A1A);
  font-family: Poppins;
  font-size: 36px;
  font-weight: 700;
  line-height: 42px;
  overflow-wrap: break-word;
}

/* Body: 20/30 */
.registro-ok-texto p {
  margin: 0;
  color: var(--VV-Black, #1A1A1A);
  font-family: Poppins;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
}

.registro-ok-texto p + p {
  margin-top: 30px;
}

.registro-ok-texto strong {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* La tarjeta centra sus hijos: la fila de botones ocupa todo el ancho */
.registro-ok-botones {
  align-self: stretch;
}

/* Snackbar del reenvío */
.registro-snackbar {
  position: fixed;
  top: 45px;
  left: 50%;
  z-index: 1090;
  width: min(675px, calc(100% - 16px));
  transform: translateX(-50%);
}

.registro-snackbar-aviso {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: var(--Spacing-M, 16px);
  font-family: Poppins;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  text-align: left;
}

.registro-snackbar-aviso[hidden] {
  display: none;
}

.registro-snackbar-aviso.ok {
  border: 1px solid #15803D;
  background: #22C55E;
  color: #052E16;
}

.registro-snackbar-aviso.error {
  border: 1px solid var(--VV-State-Error, #E91628);
  background: var(--VV-State-Error, #E91628);
  color: var(--VV-White, #FFF);
}

.registro-snackbar-aviso.error a {
  color: var(--VV-White, #FFF);
  text-decoration: underline;
}

.registro-snackbar-icono {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
}
