/* NEWSLETTER · frame "NEWSLETTER (DESKTOP ORIGINAL)" del Figma (1920×1080).
   Usa también las clases del INDEX para el menú (.ix, .ix-ui, .ix-menu).
   La ventana mide 478×446 px del Figma; se dibuja en esos px y se escala entera desde JS. */

/* W95FA (MadeByArne, licencia SIL OFL, libre para uso comercial): imita la MS Sans Serif de píxeles
   de Windows 95/98. Bajada por SEPPA el 19/10. No tiene "¿": esa letra sale en la siguiente de la lista. */
@font-face {
  font-family: "W95FA";
  src: url("../media/newsletter/fuentes/w95f.woff2") format("woff2"), url("../media/newsletter/fuentes/w95f.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

.nl {
  background: #000;
  /* DECIDIDO (SEPPA, 19/10): el mouse es el de esa época (flecha de Windows 98/2000). */
  cursor: url("../media/newsletter/cursor-flecha.png") 0 0, default;
  cursor: -webkit-image-set(url("../media/newsletter/cursor-flecha.png") 1x, url("../media/newsletter/cursor-flecha@2x.png") 2x) 0 0, default;
  cursor: image-set(url("../media/newsletter/cursor-flecha.png") 1x, url("../media/newsletter/cursor-flecha@2x.png") 2x) 0 0, default;
}

/* Botones y casilleros de la ventana: también la flecha (en esa época no cambiaban a manito).
   PROPUESTA DE CLAUDE, SIN CONFIRMAR. El menú de arriba sigue con manito, como el resto de la web
   (y como los links de los navegadores de la época). */
.nl .w98,
.nl .w98 button,
.nl .w98 label,
.nl .w98 input[type="checkbox"] {
  cursor: inherit;
}

.nl .w98 input[type="text"],
.nl .w98 input[type="email"] {
  cursor: text;
}

/* Fondo: FAV1 a 1920×1273, centrado → igual a "cubrir" la ventana del navegador. */
.nl-fondo {
  position: absolute;
  inset: 0;
  background: url("../media/newsletter/fondo-fav1.jpg") center / cover no-repeat;
}

.nl-lugar {
  position: absolute;
  left: 0;
  top: 0;
  width: 478px;
  height: 446px;
  transform-origin: 0 0;
}

.nl .nl-ui {
  z-index: 2;
}

/* --- Ventana de Windows (estilo clásico 98/2000) ------------------------------------- */
.w98 {
  --cara: #d4d0c8;
  position: absolute;
  margin: 0;
  padding: 3px;
  background: var(--cara);
  color: #000;
  /* Tipografías de la época (SEPPA, 19/10: faltaban). Como en la referencia:
     - textos y botones: MS Sans Serif de píxeles → W95FA (archivo en media/newsletter/fuentes);
     - título y valor del desplegable: Tahoma Bold;
     - recuadro del mensaje: Microsoft Sans Serif (prueba de SEPPA, 19/10), con el ejemplo inclinado;
     - barra de botones: Times (B, I, U) y Arial (A, link).
     En el iPhone no está Tahoma: el título y el desplegable se ven en Verdana Bold. */
  /* Medidas tomadas comparando con la referencia al mismo tamaño (19/10): la captura de la referencia
     está agrandada, así que la letra es más grande y más gruesa que la de Windows. */
  font: 19px/1.25 "W95FA", "Microsoft Sans Serif", "MS Sans Serif", Tahoma, Verdana, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
  font-smooth: never;
  text-rendering: optimizeSpeed;
  /* Un poco roto y blureado, como la referencia (filtro en js/newsletter.js, VIEJO). */
  filter: url(#nl-viejo);
  box-shadow: inset -1px -1px #404040, inset 1px 1px var(--cara), inset -2px -2px #808080, inset 2px 2px #fff,
    2px 3px 10px rgba(0, 0, 0, 0.18);
  user-select: none;
  -webkit-user-select: none;
}

.w98[hidden] {
  display: none;
}

.w98-titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 4px 0 5px;
  background: linear-gradient(90deg, #0a246a, #a6caf0);
  color: #fff;
  touch-action: none;
}

.w98.is-inactiva .w98-titulo {
  background: linear-gradient(90deg, #808080, #c0c0c0);
  color: #d4d0c8;
}

.w98-titulo-texto {
  font: 700 18px/1 Tahoma, Verdana, sans-serif;
  text-shadow: none;
  white-space: nowrap;
}

.w98-cerrar {
  display: grid;
  place-items: center;
  width: 27px;
  height: 24px;
  padding: 0;
  border: 0;
  background: var(--cara);
  box-shadow: inset -1px -1px #404040, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px var(--cara);
}

.w98-cerrar:active {
  box-shadow: inset 1px 1px #404040, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px var(--cara);
}

.w98-cerrar:active svg {
  translate: 1px 1px;
}

.w98-boton {
  min-width: 124px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: var(--cara);
  color: #000;
  font: inherit;
  box-shadow: inset -1px -1px #404040, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px var(--cara);
}

/* El botón por defecto lleva el marco negro de afuera. */
.w98-boton--defecto {
  box-shadow: inset 0 0 0 1px #000, inset -2px -2px #404040, inset 2px 2px #fff, inset -3px -3px #808080,
    inset 3px 3px var(--cara);
}

.w98-boton:active:not(:disabled) {
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #808080;
  padding-top: 2px;
  padding-left: 14px;
}

.w98-boton:focus {
  outline: none;
}

.w98-boton:focus-visible span,
.w98-boton:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -6px;
}

.w98-boton:disabled {
  color: #808080;
  text-shadow: 1px 1px #fff;
}

/* --- Contenido de la ventana (medidas tomadas de la referencia de 478×446) ------------ */
.nl-ventana {
  left: 0;
  top: 0;
  width: 478px;
  height: 446px;
  display: flex;
  flex-direction: column;
}

.nl-ventana[hidden] {
  display: none;
}

.nl-cuerpo {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 14px 13px 20px;
}

.nl-etiqueta {
  margin: 0;
}

.nl-fila--quien {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px; /* SEPPA (19/10): menos espacio entre el título y el desplegable */
  height: 37px;
}

.nl-fila--quien .nl-etiqueta {
  width: 112px;
  flex: none;
}

/* Desplegable */
.w98-combo {
  position: relative;
  flex: 1;
  height: 37px;
  display: flex;
  background: #fff;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #404040, inset -2px -2px var(--cara);
  padding: 2px;
}

.w98-combo-valor {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #000;
  font: 700 22px/1 Tahoma, Verdana, sans-serif;
  text-shadow: none;
  text-align: left;
  /* SEPPA (19/10): "rompela un toque más". Filtro más fuerte que el del resto (nl-roto en js/newsletter.js). */
  filter: url(#nl-roto);
  white-space: nowrap;
  overflow: hidden;
}

.w98-combo-valor:focus {
  outline: none;
}

.w98-combo-valor:focus-visible {
  background: #0a246a;
  color: #fff;
}

.w98-combo-boton {
  width: 24px;
  display: grid;
  place-items: center;
  background: var(--cara);
  box-shadow: inset -1px -1px #404040, inset 1px 1px var(--cara), inset -2px -2px #808080, inset 2px 2px #fff;
}

.w98-combo:active .w98-combo-boton {
  box-shadow: inset 0 0 0 1px #808080;
}

.w98-lista {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 3;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #000;
  font: 15px/1.2 "W95FA", "Microsoft Sans Serif", Tahoma, Verdana, sans-serif;
}

.w98-lista li {
  padding: 2px 5px;
  white-space: nowrap;
}

.w98-lista li[aria-selected="true"] {
  background: #0a246a;
  color: #fff;
}

.nl-mensaje {
  margin-top: 21px;
  height: 24px;
}

/* Barra de botones de formato (decoración) */
.nl-herramientas {
  display: flex;
  align-items: center;
  /* SEPPA (19/10): los botones de la barra ocupan todo el ancho, como en la referencia. */
  justify-content: space-between;
  gap: 0;
  margin-top: 9px;
  height: 31px;
  padding: 0 8px;
  background: var(--cara);
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
}

.nl-h {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 25px;
  padding: 0 4px;
  font: 700 19px/1 "Times New Roman", Times, serif;
  color: #000;
}

.nl-h:hover {
  box-shadow: inset -1px -1px #808080, inset 1px 1px #fff;
}

.nl-h.is-hundido {
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
  translate: 1px 1px;
}

.nl-h b {
  font-size: 11px;
}

.nl-h--azul {
  color: #1c3fd8;
  font-family: Arial, sans-serif;
  text-decoration: underline 2px;
}

.nl-h--fondo {
  color: #fff;
  font-family: Arial, sans-serif;
  background: #1c3fd8;
  min-width: 22px;
  height: 20px;
  margin: 0 3px;
  outline: 1px solid #000;
}

.nl-h--chica {
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.nl-h--grande {
  font-family: Arial, sans-serif;
  font-size: 19px;
}

.nl-h--i {
  font-style: italic;
}

.nl-h--u {
  text-decoration: underline;
}

.nl-h--link {
  font: 700 18px/1 Arial, sans-serif;
  color: #1c3fd8;
  text-decoration: underline;
}

.nl-sep {
  width: 2px;
  height: 24px;
  margin: 0;
  box-shadow: inset 1px 0 #808080, inset -1px 0 #fff;
}

.nl-h--carita {
  margin-left: 0;
}

/* Recuadro blanco con nombre y correo */
.nl-texto {
  margin-top: 2px;
  height: 89px;
  padding: 3px 6px 0 7px;
  background: #fff;
  box-shadow: inset 1px 1px #404040, inset 2px 2px #000, inset 3px 3px #404040, inset -1px -1px #fff, inset -2px -2px var(--cara);
  /* SEPPA (19/10): no es Times ni Georgia; probar con Microsoft Sans Serif (viene en la Mac).
     No tiene itálica: el ejemplo del correo sale inclinado por el navegador. En el iPhone no está: sale Verdana. */
  font: 20px/1 "Microsoft Sans Serif", "MS Sans Serif", Tahoma, Verdana, sans-serif;
  cursor: text;
}

.nl-renglon {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  height: 32px;
  padding-top: 3px;
}

.nl-renglon span {
  flex: none;
}

.nl-renglon input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font: inherit;
  user-select: text;
  -webkit-user-select: text;
}

.nl-renglon input::placeholder {
  color: #8c8c8c;
  font-style: italic;
  opacity: 1;
}

.nl-renglon input:focus {
  outline: none;
}

/* Special Characters + casillero */
.nl-pie {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 10px;
}

.nl-especiales p {
  margin: 0;
  line-height: 24px;
  white-space: nowrap;
}

.nl-especiales p + p {
  padding-left: 6px;
}

.nl-k {
  display: inline-block;
  width: 33px;
}

.nl-guardar {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 24px;
}

.w98-check {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0 0 3px;
  background: #fff;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #404040, inset -2px -2px var(--cara);
}

.w98-check:checked {
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M6 0h1v3H6zM5 1h1v3H5zM0 2h1v3H0zM4 2h1v3H4zM1 3h1v3H1zM3 3h1v3H3zM2 4h1v3H2z'/%3E%3C/svg%3E")
    center / 7px 7px no-repeat;
}

.w98-check:focus {
  outline: none;
}

.nl-botones {
  display: flex;
  justify-content: center;
  gap: 33px;
  margin-top: auto;
}

.nl-ventana.is-esperando,
.nl-ventana.is-esperando * {
  cursor: progress;
}

/* --- Aviso (gracias / errores) ------------------------------------------------------- */
.nl-aviso {
  left: 50%;
  top: 50%;
  width: 360px;
  translate: -50% -50%;
  z-index: 4;
}

.nl-aviso-cuerpo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px 6px;
}

.nl-aviso-icono {
  flex: none;
  width: 32px;
  height: 32px;
}

.nl-aviso-texto {
  margin: 0;
  user-select: text;
  -webkit-user-select: text;
}

.nl-aviso-botones {
  display: flex;
  justify-content: center;
  padding: 12px 0 14px;
}

.nl-aviso .w98-boton {
  min-width: 90px;
  height: 30px;
}

/* Letra subrayada de los atajos de teclado, como "I'm Away" y "Save for later use" de la referencia. */
.w98 u.atajo {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* Carita al final del correo, como en la referencia. */
.nl-carita-texto {
  position: absolute;
  top: 3px;
  left: 0;
  line-height: 0;
  pointer-events: none;
}

/* Autocompletar del navegador: sin el fondo amarillo/celeste, y avisa a JS (animationstart). */
.nl-renglon input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #fff inset;
  -webkit-text-fill-color: #000;
  animation: nl-autocompletado 1ms;
}

@keyframes nl-autocompletado {
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}

.nl-carita-texto svg {
  width: 26px;
  height: 26px;
}
