/* Novedades (Client/Shared/Novedades, portado de RediseñoV2 278332939): enlace del header y diálogo "Lo que viene en EasyLoad".
   Usa la tipografía y los colores del sistema (app.css y tema bootstrap4): rojo del logo, azul de botones, grises de las tablas.
   Clases con prefijo nov- para no chocar con app.css. */
/* Variables también en el visor: va fuera de la capa y en el prototipo se quedaba sin colores. */
.nov-capa,
.nov-img-visor {
    --nov-rojo: #940404;
    --nov-primario: #940404;
    --nov-primario-hover: #7a0303;
    --nov-marca: #0d7abd;
    --nov-azul: #054197;
    --nov-borde: #dee2e6;
    --nov-texto: #212529;
    --nov-texto-suave: #495057;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--nov-texto);
}

.nov-capa button { font-family: inherit; }

/* ---------- Enlace del header ---------- */
/* Misma forma que el botón "Reportar / Ayuda" (pastilla sólida, texto en negritas, ícono a la izquierda), pero en azul. */
.nov-enlace {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: #0069d9;
    color: #fff;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s;
}

.nov-enlace svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nov-enlace:hover,
.nov-enlace:active {
    background: #0056b3;
    color: #fff;
}

.nov-enlace:focus-visible {
    outline: 2px solid #0069d9;
    outline-offset: 2px;
}

.nov-dlg-cerrar:focus-visible,
.nov-dlg-boton:focus-visible,
.nov-dlg-flecha:focus-visible {
    outline: 2px solid var(--nov-primario);
    outline-offset: 2px;
}

.nov-dlg-cerrar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ---------- Capa del diálogo ---------- */
/* Capa fija del tamaño de la ventana. Recorta las animaciones de entrada y salida: sin el recorte el navegador agregaba y
   quitaba la barra de desplazamiento de la página y el contenido de atrás cambiaba de ancho. */
.nov-capa {
    position: fixed;
    inset: 0;
    z-index: 20000; /* por encima del botón flotante de rastreo (z-index 10000) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    /* Lo de atrás se oscurece poco y se ve borroso. */
    background: rgba(10, 12, 14, .4);
    animation: nov-aparece .25s ease both;
}

/* El contenido principal de la app (#maintext) lleva un transform de Syncfusion (animación del menú lateral), y por eso una
   capa "fija" se mediría contra él y no contra la ventana: el oscurecido dejaría fuera el encabezado y el menú.
   Mientras el diálogo está abierto se anula ese transform (y su transición, para que no haya saltos). */
#maintext:has(.nov-capa) {
    transform: none !important;
    transition: none !important;
}

.nov-capa-cierra { animation: nov-desvanece .2s ease-in forwards; }

@keyframes nov-aparece {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nov-desvanece {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ---------- Diálogo ---------- */
/* Diseño amable y tranquilo: blanco, esquinas suaves, texto un poco más grande, rojo de EasyLoad solo como acento suave. */
.nov-dlg {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1080px, 100%);
    /* Alto fijo: el diálogo no cambia de tamaño al elegir otra novedad (si no cabe, el cuerpo se desplaza). */
    height: min(600px, 100%);
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    outline: none;
    /* Al abrir, crece mientras aparece. Solo escala (sin desplazarse) para no salirse de la ventana. */
    animation: nov-abre .32s cubic-bezier(.2, .8, .2, 1) backwards;
}

.nov-dlg-cierra {
    pointer-events: none;
    animation: nov-cierra .2s ease-in forwards;
}

@keyframes nov-abre {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: none; }
}

@keyframes nov-cierra {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: scale(.96); }
}

.nov-dlg-cerrar {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5d656c;
    cursor: pointer;
    transition: background .15s;
}

.nov-dlg-cerrar:hover { background: #f0f0f0; }

/* ---------- Encabezado ---------- */
.nov-dlg-cab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 56px 6px 22px;
}

.nov-dlg-logo {
    flex: none;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.nov-dlg-cab-texto { min-width: 0; }

.nov-dlg-titulo {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--nov-texto);
}

.nov-dlg-intro {
    margin: 0;
    font-size: .9rem;
    line-height: 1.4;
    color: #5d656c;
}

/* ---------- Imagen y texto de la novedad destacada ---------- */
.nov-dlg-media {
    position: relative;
    overflow: hidden;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    background: #f3f3f3;
}

.nov-dlg-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    cursor: zoom-in;
    animation: nov-img-entra .35s ease both;
}

/* Al pasar el mouse (o enfocar con el teclado) la imagen se sombrea y aparece "Visualización" con una lupa,
   para invitar a hacer clic y abrir el modo visualización. No bloquea el clic (pointer-events: none). */
.nov-dlg-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(10, 12, 14, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.nov-dlg-media::before {
    content: "Visualización";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    padding: 7px 18px 7px 42px;
    border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a0303' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E") no-repeat 14px center / 20px 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    color: var(--nov-texto);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -38%);
    transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}

.nov-dlg-media:hover::after,
.nov-dlg-media:has(.nov-dlg-img:focus-visible)::after { opacity: 1; }

.nov-dlg-media:hover::before,
.nov-dlg-media:has(.nov-dlg-img:focus-visible)::before {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.nov-dlg-img:focus-visible { outline: none; }

/* El número y las flechas quedan por encima del sombreado. */
.nov-dlg-num,
.nov-dlg-flecha { z-index: 3; }

@keyframes nov-img-entra {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: none; }
}

/* Al cambiar de novedad o de imagen, la imagen y el texto entran deslizándose desde el lado hacia donde se avanza
   (derecha al ir adelante, izquierda al ir atrás); los puntos aparecen uno tras otro. */
.nov-cambia-sig .nov-dlg-img { animation: nov-sel-der .4s cubic-bezier(.2, .8, .2, 1) both; }
.nov-cambia-ant .nov-dlg-img { animation: nov-sel-izq .4s cubic-bezier(.2, .8, .2, 1) both; }

/* El texto solo se anima al elegir otra novedad (clase nov-texto-*). Al pasar de imagen no lleva ninguna animación:
   si la tuviera, al invertir el sentido (izquierda y luego derecha) cambiaría de animación y parpadearía. */
.nov-gen-dest .nov-dlg-texto { animation: none; }
.nov-gen-dest .nov-dlg-texto.nov-texto-sig { animation: nov-sel-der-suave .45s .05s cubic-bezier(.2, .8, .2, 1) both; }
.nov-gen-dest .nov-dlg-texto.nov-texto-ant { animation: nov-sel-izq-suave .45s .05s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes nov-sel-der { from { opacity: 0; transform: translateX(56px); } to { opacity: 1; transform: none; } }
@keyframes nov-sel-izq { from { opacity: 0; transform: translateX(-56px); } to { opacity: 1; transform: none; } }
@keyframes nov-sel-der-suave { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes nov-sel-izq-suave { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* Número de la imagen ("1 / 7"): pequeño y translúcido, en la esquina. */
.nov-dlg-num {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(33, 37, 41, .6);
    color: #fff;
    font-size: .75rem;
    line-height: 1.6;
}

.nov-dlg-flecha {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #2b3035;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s, color .15s;
}

.nov-dlg-flecha:hover {
    background: var(--nov-primario);
    color: #fff;
}

.nov-dlg-flecha svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nov-dlg-flecha-ant { left: 10px; }
.nov-dlg-flecha-sig { right: 10px; }

.nov-dlg-texto {
    min-width: 0;
    animation: nov-aparece .3s ease both;
}

.nov-dlg-texto h3 {
    margin: 0 0 4px;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

.nov-dlg-texto p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.5;
    color: #5d656c;
}

.nov-dlg-puntos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: .95rem;
}

.nov-dlg-puntos li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #2b3035;
    line-height: 1.4;
    animation: nov-punto .4s ease both;
}

.nov-dlg-puntos li:nth-child(1) { animation-delay: .12s; }
.nov-dlg-puntos li:nth-child(2) { animation-delay: .18s; }
.nov-dlg-puntos li:nth-child(3) { animation-delay: .24s; }
.nov-dlg-puntos li:nth-child(4) { animation-delay: .30s; }
.nov-dlg-puntos li:nth-child(5) { animation-delay: .36s; }
.nov-dlg-puntos li:nth-child(n+6) { animation-delay: .42s; }

@keyframes nov-punto {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* Palomita roja fina, sin círculo. */
.nov-dlg-puntos svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    fill: none;
    stroke: var(--nov-rojo);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nov-dlg-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.nov-dlg-boton svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .15s;
}

.nov-dlg-boton-pri:hover svg { transform: translateX(3px); }
.nov-dlg-boton-sec:hover svg { transform: translateX(-3px); }

/* Principal: gris oscuro, sin sombras; se vuelve rojo de EasyLoad al pasar el mouse. */
.nov-dlg-boton-pri {
    border-color: #2f3337;
    background: #2f3337;
    color: #fff;
}

.nov-dlg-boton-pri:hover {
    border-color: var(--nov-primario);
    background: var(--nov-primario);
}

/* Secundario: blanco con borde gris fino. */
.nov-dlg-boton-sec {
    border-color: #cfd3d6;
    background: #fff;
    color: #2b3035;
}

.nov-dlg-boton-sec:hover {
    border-color: var(--nov-primario);
    color: var(--nov-primario);
}

/* ---------- Vista general: novedad destacada + tarjetas + invitación a sugerir ---------- */
.nov-gen-cab {
    padding: 10px 56px 10px 22px;
    border-bottom: 1px solid #ececec;
}

.nov-gen-cuerpo {
    flex: 1;
    min-height: 0;
    padding: 12px 20px;
    /* El cuerpo no se desplaza: la destacada queda fija y solo la lista de tarjetas tiene scroll. */
    overflow: hidden;
    animation: nov-aparece .25s ease both;
}

/* Dos paneles del alto del cuerpo: la destacada a la izquierda (toma el resto del ancho) y la lista de tarjetas
   (una columna, del ancho de sus tarjetas) a la derecha. */
.nov-gen-rejilla {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
    gap: 10px;
    height: 100%;
}

/* Tarjeta destacada: ocupa toda la columna izquierda. Si su contenido no cabe, se desplaza dentro de sí misma. */
.nov-gen-dest {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 14px 14px;
    border: 1px solid #f0d9d9;
    border-radius: 16px;
    background: linear-gradient(#fdf1f1, #fff 38%);
}

.nov-gen-etiqueta {
    font-size: .8rem;
    font-weight: 600;
    color: var(--nov-rojo);
}

/* La imagen ocupa siempre el mismo rectángulo (proporción de las capturas), para que el título quede siempre a la misma altura. */
.nov-gen-dest .nov-dlg-media { aspect-ratio: 2.28 / 1; }

.nov-gen-dest .nov-dlg-img {
    height: 100%;
    max-height: none;
    object-fit: contain;
}

.nov-gen-dest .nov-dlg-texto h3 { font-size: 1.05rem; }

.nov-gen-dest .nov-dlg-texto p { font-size: .88rem; line-height: 1.4; }

.nov-gen-dest .nov-dlg-puntos {
    gap: 4px;
    margin-top: 6px;
    font-size: .85rem;
}

/* Lista de tarjetas en una columna, con scroll propio. El relleno deja ver el borde de la activa, el foco y la sombra al pasar el mouse. */
.nov-gen-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    padding: 3px 6px 3px 3px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Reserva el espacio de la barra aunque no haga falta, para que el ancho no cambie según cuántas tarjetas haya. */
    scrollbar-gutter: stable;
}

/* Una tarjeta por novedad: toda la tarjeta es un botón que abre su detalle.
   Ancho fijo de 295px: el mismo que tenían con la rejilla de dos columnas. */
.nov-gen-tarjeta {
    flex: none;
    width: 295px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
    min-width: 0;
    /* Alto mínimo común: cubre la tarjeta con más texto, así todas miden lo mismo sin importar cuál esté destacada. */
    min-height: 8.5rem;
    padding: 12px 14px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
    color: var(--nov-texto);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.nov-gen-tarjeta:hover {
    border-color: #e3c4c4;
    box-shadow: 0 4px 14px rgba(148, 4, 4, .08);
    transform: translateY(-1px);
}

.nov-gen-tarjeta:focus-visible {
    outline: 2px solid var(--nov-primario);
    outline-offset: 2px;
}

.nov-gen-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #fbeeee;
    color: var(--nov-rojo);
}

.nov-gen-icono svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nov-gen-tarjeta strong {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.nov-gen-resumen {
    grid-column: 1 / -1;
    align-self: start;
    font-size: .85rem;
    line-height: 1.38;
    color: #5d656c;
}

.nov-gen-ver {
    display: inline-flex;
    align-items: center;
    grid-column: 1 / -1;
    justify-self: start;
    gap: 4px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--nov-rojo);
}

.nov-gen-ver svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s;
}

.nov-gen-tarjeta:hover .nov-gen-ver svg { transform: translateX(3px); }

/* Tarjeta de la novedad que se está viendo: borde y fondo rojizos, icono sólido y "Viendo ahora". */
.nov-gen-activa,
.nov-gen-activa:hover {
    border-color: var(--nov-rojo);
    background: #fdf1f1;
    box-shadow: 0 0 0 1px var(--nov-rojo);
    transform: none;
    cursor: default;
}

.nov-gen-activa .nov-gen-icono {
    background: var(--nov-rojo);
    color: #fff;
    animation: nov-icono-activo .4s cubic-bezier(.2, .8, .2, 1);
}

@keyframes nov-icono-activo {
    0% { transform: scale(.7) rotate(-12deg); }
    60% { transform: scale(1.12) rotate(4deg); }
    100% { transform: none; }
}

.nov-gen-tarjeta,
.nov-gen-icono { transition: border-color .25s, box-shadow .25s, background .25s, color .25s, transform .2s; }

.nov-gen-viendo { gap: 6px; }

.nov-gen-punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nov-rojo);
    animation: nov-latido 1.6s ease-in-out infinite;
}

@keyframes nov-latido {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.7); }
}

.nov-gen-pie {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 20px;
    border-top: 1px solid #ececec;
}

@media (max-width: 1000px) {
    /* La destacada va arriba, fija, y la lista de tarjetas debajo con su scroll.
       La destacada cede alto (y se desplaza por dentro) para que la lista conserve al menos una tarjeta visible. */
    .nov-gen-rejilla {
        display: flex;
        flex-direction: column;
    }
    .nov-gen-dest { flex: 0 1 auto; }
    .nov-gen-dest .nov-dlg-media { max-height: 32vh; }
    .nov-gen-lista { flex: 1 0 9.5rem; }
    .nov-gen-tarjeta { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .nov-gen-cuerpo { animation: none; }
    .nov-gen-tarjeta,
    .nov-gen-ver svg { transition: none; }
    .nov-gen-activa .nov-gen-icono,
    .nov-gen-punto { animation: none; }
}

/* ---------- Imagen sola, a pantalla completa ---------- */
.nov-img-visor {
    position: fixed;
    inset: 0;
    z-index: 20001;
    display: flex;
    /* El contenido va pegado arriba (no centrado), para que la imagen quede más alta y use todo el alto disponible. */
    align-items: flex-start;
    justify-content: center;
    /* Márgenes alrededor: la X queda a la derecha y las flechas a los lados, para que no tapen la imagen. */
    padding: 40px 96px 20px;
    background: rgba(10, 12, 14, .6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    outline: none;
    animation: nov-visor-abre .26s cubic-bezier(.2, .8, .2, 1) both;
}

/* nov-visor-cierra dura lo mismo que DuracionVisorCierre en NovedadesDialogo.razor. */
.nov-img-visor-cierra {
    pointer-events: none;
    animation: nov-visor-cierra .18s ease-in forwards;
}

@keyframes nov-visor-abre {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: none; }
}

@keyframes nov-visor-cierra {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: scale(.97); }
}

.nov-img-visor-fig {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    margin: 0;
}

/* Cambio de imagen en el visor: la actual sale hacia un lado y la nueva entra por el otro (texto e imagen juntos).
   Las duraciones deben coincidir con DuracionVisorSalida (160 ms) y DuracionVisorEntrada (280 ms) de NovedadesDialogo.razor. */
.nov-vis-sale-izq { animation: nov-vis-sale-izq .16s ease-in forwards; }
.nov-vis-sale-der { animation: nov-vis-sale-der .16s ease-in forwards; }
.nov-vis-entra-der { animation: nov-vis-entra-der .28s ease-out both; }
.nov-vis-entra-izq { animation: nov-vis-entra-izq .28s ease-out both; }

@keyframes nov-vis-sale-izq { to { opacity: 0; transform: translateX(-70px); } }
@keyframes nov-vis-sale-der { to { opacity: 0; transform: translateX(70px); } }
@keyframes nov-vis-entra-der { from { opacity: 0; transform: translateX(70px); } to { opacity: 1; transform: none; } }
@keyframes nov-vis-entra-izq { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: none; } }

.nov-img-visor-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: min(900px, 100%);
    text-align: center;
    color: rgba(255, 255, 255, .9);
    font-size: .95rem;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}

.nov-img-visor-marcas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.nov-img-visor-gif {
    padding: 1px 12px;
    border-radius: 999px;
    background: var(--nov-rojo);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.5;
    color: #fff;
    text-shadow: none;
}

.nov-img-visor-num {
    padding: 1px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.5;
    color: #fff;
}

.nov-img-visor-img {
    display: block;
    max-width: 100%;
    /* Alto de la ventana menos los márgenes del visor y la fila de marcas de arriba. */
    max-height: calc(100vh - 40px - 20px - 40px);
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    user-select: none;
    -webkit-user-drag: none;
}

.nov-img-visor-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
}

.nov-img-visor-cerrar:hover { background: var(--nov-rojo); }

.nov-img-visor-cerrar svg,
.nov-img-visor-flecha svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nov-img-visor-cerrar svg { width: 22px; height: 22px; }

.nov-img-visor-flecha {
    position: absolute;
    /* Cerca del centro de la imagen: como el contenido empieza arriba, su centro queda un poco más abajo que el de la ventana. */
    top: calc(50% + 36px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s, border-color .15s;
}

.nov-img-visor-flecha:hover,
.nov-img-visor-flecha:focus-visible {
    background: var(--nov-primario);
    border-color: #fff;
    outline: 2px solid var(--nov-primario);
    outline-offset: 2px;
}

.nov-img-visor-flecha svg { width: 26px; height: 26px; }
.nov-img-visor-flecha-ant { left: 22px; }
.nov-img-visor-flecha-sig { right: 22px; }

/* ---------- Pantallas chicas ---------- */
@media (max-width: 820px) {
    .nov-dlg-intro { display: none; }
    .nov-dlg-img { max-height: 36vh; }
}

@media (max-width: 768px) {
    /* En el header, con poco ancho el enlace queda solo con el ícono (igual que "Reportar / Ayuda"). */
    .nov-enlace-texto { display: none; }
    .nov-enlace { padding: 6px 10px; }
}

@media (max-width: 640px) {
    .nov-capa { padding: 8px; }
    /* En pantallas angostas las flechas del visor van debajo de la imagen. */
    .nov-img-visor { padding: 60px 10px 84px; }
    .nov-img-visor-img { max-height: calc(100vh - 60px - 84px - 40px); }
    .nov-img-visor-flecha { top: auto; bottom: 18px; transform: none; }
    .nov-img-visor-flecha-ant { left: calc(50% - 66px); }
    .nov-img-visor-flecha-sig { right: calc(50% - 66px); }
}

@media (prefers-reduced-motion: reduce) {
    .nov-capa,
    .nov-dlg,
    .nov-dlg-img,
    .nov-dlg-texto,
    .nov-img-visor { animation: none; }
    .nov-dlg-media::before,
    .nov-dlg-media::after { transition: none; }
    .nov-gen-dest * { animation: none !important; transition: none !important; }
    .nov-dlg-cierra { animation: none; opacity: 0; }
    .nov-capa-cierra { animation: none; opacity: 0; }
    .nov-img-visor-cierra { animation: none; opacity: 0; }
    /* Sin animación al cambiar de imagen en el visor: cambia de golpe. */
    .nov-vis-sale-izq,
    .nov-vis-sale-der,
    .nov-vis-entra-der,
    .nov-vis-entra-izq { animation: none; }
}
