/* Settings (`settings.html`): the categories as tabs, a category as a list of
   rows, and one option as a round button back plus its name. Only what the
   page needs on top of style.css, whose tokens, `.pestanas`, `.boton-redondo`
   and `.segmentado-botones` it reuses. */

/* The tabs are links, one per category, and read like the CV page's: the
   chosen one in blue and underlined, no box. Hover and keyboard focus change
   only the colour or the underline. */
.ajustes-pestanas { margin-bottom: 1.5rem; }
.ajustes-pestanas a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid transparent;
  color: var(--texto-suave);
  font-weight: 600;
  white-space: nowrap;
}
.ajustes-pestanas a:hover { color: var(--texto); }
.ajustes-pestanas a[aria-current="page"],
.ajustes-pestanas a:focus-visible { color: var(--acento-fuerte); border-bottom-color: var(--acento); outline: none; }

/* Unread replies, as a small bubble beside the name. */
.ajustes-burbuja {
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--acento);
  color: var(--texto-sobre-acento);
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}

/* Each option of a category as a row: its name, what it is set to now, and
   an arrow. Nothing changes under the pointer but the arrow. */
.ajustes-filas {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: var(--radio-tarjeta);
  box-shadow: var(--sombra);
  overflow: hidden;
}
.ajustes-filas li + li { border-top: 1px solid var(--borde); }
.ajustes-fila {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  color: var(--texto);
}
.ajustes-fila:hover .ajustes-fila-flecha { color: var(--acento); }
.ajustes-fila-nombre { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ajustes-fila-valor { flex: 0 1 45%; min-width: 0; text-align: right; color: var(--texto-suave); font-weight: 400; overflow-wrap: anywhere; }
.ajustes-fila-flecha { flex: none; color: var(--texto-suave); }

/* An option: «‹» and its name once, then the choices. The preferences and the
   account have no box around them; the other categories keep theirs (`.tarjeta`). */
.ajustes-cabecera { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0 1.25rem; }
.ajustes-cabecera h1 { margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.ajustes-cabecera .boton-redondo { flex: none; }
.ajustes-opcion-preferencias,
.ajustes-opcion-cuenta,
.ajustes-opcion-ia { max-width: 46rem; margin-inline: auto; }

/* Every option: the name centred between «‹» and, where a conversation puts
   one, its badge at the right. */
.ajustes-cabecera {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
}
.ajustes-cabecera .boton-redondo { justify-self: start; }
.ajustes-cabecera h1 { text-align: center; }
.barra-centrada { justify-content: center; }

/* «Borrar» in a row, «Borrar todas» and «Quitar la clave guardada»: small red
   text, no frame. */
.boton-borrar, button.boton-borrar {
  padding: 0.2rem 0.5rem;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--peligro);
  font-size: 0.85rem;
}
.boton-borrar:hover, button.boton-borrar:hover { background: none; text-decoration: none; }

/* The rule under a field sits close to it, as part of the field. */
.ajustes-opcion-cuenta .campo .ayuda { margin: 0; }
.ajustes-opcion-cuenta .campo .opcion-casilla { font-weight: 400; }

/* «¿No la recuerdas?»: a link sent as a form button; it only changes colour
   under the pointer, unlike the underlined `.boton-enlace`. */
.ajustes-olvido { align-self: flex-start; font-size: 0.9rem; }
button.ajustes-olvido:hover { background: none; color: var(--acento-fuerte); text-decoration: none; }

/* Choosing saves: the buttons are the form. */
.ajustes-eleccion { margin: 0; }

/* A few short choices in one row, the same control as «Español | English»
   in Adapt, a size larger because it is the whole screen. */
.ajustes-segmentado button { padding: 0.7rem 1.6rem; font-size: 1rem; }
.ajustes-segmentado button:hover { background: var(--fondo-suave); }
.ajustes-segmentado button[aria-pressed="true"]:hover { background: var(--acento); }

/* Long names or several choices: a list with a ✓ on the chosen one. The ✓ has
   its own margin on the right so that it never touches a long name. */
.ajustes-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: var(--radio-tarjeta);
  overflow: hidden;
}
.ajustes-lista li + li { border-top: 1px solid var(--borde); }
.ajustes-lista button,
.ajustes-lista button:hover {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.95rem 1.75rem 0.95rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 1rem;
  text-align: left;
  overflow-wrap: anywhere;
}
.ajustes-lista button:hover { color: var(--acento-fuerte); }
.ajustes-lista button:focus-visible { outline: 2px solid var(--acento); outline-offset: -2px; }
.ajustes-visto { flex: none; color: var(--acento); font-weight: 700; }

/* The support form. */
.etiqueta-grupo { font-weight: 600; font-size: 0.9rem; }
.datos-tecnicos {
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: var(--fondo-suave);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  .ajustes-segmentado { display: flex; }
  .ajustes-segmentado button { flex: 1; justify-content: center; padding-inline: 0.5rem; }
}

/* Own AI key: the tabs, the row of providers and the button to get a key sit
   centred; the key field and the button under it have their own line each. */
.ajustes-clave-ia, .ajustes-clave-panel { gap: 1.25rem; }
.ajustes-clave-panel { display: flex; flex-direction: column; }
.ajustes-clave-ia .pestanas { margin-bottom: 0.25rem; }
.ajustes-clave-ia .ajustes-segmentado { align-self: center; max-width: 100%; }
.ajustes-conseguir-clave { margin: 0; text-align: center; }
.ajustes-quitar-clave { margin: 0; }
.ajustes-quitar-clave .boton-borrar { padding-left: 0; }
.ajustes-segmentado button:focus-visible { outline: 2px solid var(--acento); outline-offset: -3px; }
