/* Base común: fuente autoalojada, fichas de color y cabecera negra con el rótulo. */

@font-face {
  font-family: "Manrope";
  src: url("../fuentes/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Las mismas fichas en la pantalla de la tele y en el mostrador. */
  --negro: #000000;
  --banda: #15171a;
  --banda-alta: #1d2024;
  --naranja: #ff7e29;
  --tinta: #1a1009;
  --tiza: #f4f1ec;
  --ahora: #3a2210;
  --papel: #ffffff;
  --linea: #dedad4;
  --gris: #6b645d;
  --naranja-texto: #b4470a; /* el naranja, oscurecido para leerse sobre blanco */
  --rojo: #a3261a;
  --rojo-fondo: #fdf0ee;
  --ambar: #7a4a00;
  --ambar-fondo: #fff5e2;
  --fuente: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--fuente);
  font-size: 100%;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--papel);
  color: var(--tinta);
  font-weight: 500;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--naranja-texto);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Cabecera negra: el rótulo va siempre en blanco sobre oscuro --- */

.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.625rem clamp(1rem, 3vw, 2.5rem);
  background: var(--negro);
  color: var(--tiza);
}

.cabecera-rotulo {
  height: 3.25rem;
  width: auto;
}

.cabecera-lado {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.cabecera a {
  color: var(--tiza);
  font-weight: 700;
  text-decoration: none;
}

.cabecera a:hover {
  text-decoration: underline;
}

.estado-conexion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #b9b4ad;
  white-space: nowrap;
}

.estado-conexion::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #6f6a64;
}

.estado-conexion[data-copia="lista"]::before {
  background: #7fc98b;
}

.estado-conexion[data-en-linea="no"] {
  color: var(--tiza);
}

.estado-conexion[data-en-linea="no"]::before {
  background: var(--naranja);
}

/* --- Aviso de versión nueva --- */

.aviso-version {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 0.75rem 0.625rem 1.125rem;
  border-radius: 0.75rem;
  background: var(--tinta);
  color: var(--tiza);
  font-size: 0.9375rem;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 28%);
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border: 2px solid var(--tinta);
  border-radius: 0.625rem;
  background: var(--papel);
  color: var(--tinta);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.boton:hover {
  background: #f3f1ee;
}

.boton-principal {
  border-color: var(--naranja);
  background: var(--naranja);
  color: var(--tinta);
}

.boton-principal:hover {
  background: #ff914a;
  border-color: #ff914a;
}

.boton[disabled],
.boton[aria-disabled="true"] {
  border-color: var(--linea);
  background: #f1efec;
  color: #9a948d;
  cursor: not-allowed;
}

.boton-llano {
  min-height: 2.25rem;
  padding: 0.25rem 0.75rem;
  border-width: 1px;
  border-color: var(--linea);
  font-weight: 600;
  font-size: 0.875rem;
}

.aviso-version .boton {
  min-height: 2.25rem;
  padding: 0.25rem 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
