/* Modo Navidad · Gran Coffee Shams (navidad.css).
 * Se activa colocando data-tema="navidad" en <html>.
 * Paleta verde pino, rojo arándano y oro champán; luces en la cabecera y copos sutiles
 * construidos exclusivamente con CSS y SVG en data URI (sin JS ni recursos externos).
 * Respeta contraste WCAG AA, prefers-reduced-motion y móvil 320 px primero. */

html[data-tema="navidad"] {
  --bosque: #0E382D;
  --bosque-oscuro: #08221B;
  --bosque-medio: #144A3C;
  --verde: #145E4A;
  --verde-salvia: #497564;
  --vino: #8B1E24;
  --vino-claro: #A6262D;
  --sol: #E08B35;
  --sol-oro: #F5CF86;
  --sol-texto: #8B1E24;
  --oro-claro: #FFF0C7;
  --crema: #FCF6EA;
  --crema-calida: #F3E7D1;
  --linea: #E5D6BC;
  --tema-cabecera-bg:
    radial-gradient(90% 100% at 50% 0%, rgba(245, 207, 134, .18) 0%, transparent 65%),
    repeating-conic-gradient(from 180deg at 50% 130%, rgba(245, 207, 134, .16) 0 4deg, transparent 4deg 14deg),
    linear-gradient(160deg, rgba(19, 72, 58, .88) 0%, rgba(14, 56, 45, .92) 55%, rgba(8, 34, 27, .95) 100%),
    url('../img/local/10-mural.jpg') center / cover no-repeat;
  --tema-marco-foil: linear-gradient(135deg, #FFF3D1 0%, #F5CF86 24%, #8B1E24 46%, #FFE9B8 64%, #C8842E 82%, #6E171C 100%);
}

/* Fondo de papel invernal cálido y copos sutiles */
html[data-tema="navidad"] body.pagina {
  background: radial-gradient(120% 60% at 50% 0, #FFFDF8 0, var(--crema) 58%, var(--crema-calida) 100%) fixed;
}

html[data-tema="navidad"] body.pagina::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .34;
  background-repeat: repeat;
  background-size: 220px 220px, 310px 310px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg stroke='%23C9A35B' stroke-opacity='.55' stroke-width='1.3' stroke-linecap='round' fill='none'%3E%3Cg transform='translate(46 44)'%3E%3Cpath d='M0-9V9M-7.8-4.5 7.8 4.5M-7.8 4.5 7.8-4.5'/%3E%3Ccircle cx='0' cy='0' r='1.8' fill='%23FFF5D6' stroke='none'/%3E%3C/g%3E%3Cg transform='translate(162 128) scale(.85)'%3E%3Cpath d='M0-9V9M-7.8-4.5 7.8 4.5M-7.8 4.5 7.8-4.5'/%3E%3Ccircle cx='0' cy='0' r='1.8' fill='%23FFF5D6' stroke='none'/%3E%3C/g%3E%3Ccircle cx='120' cy='38' r='1.6' fill='%23E5C57B' fill-opacity='.45' stroke='none'/%3E%3Ccircle cx='28' cy='168' r='1.4' fill='%238B1E24' fill-opacity='.22' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='310' height='310' viewBox='0 0 310 310'%3E%3Cg stroke='%23145E4A' stroke-opacity='.22' stroke-width='1.2' stroke-linecap='round' fill='none'%3E%3Cg transform='translate(215 70) scale(.75)'%3E%3Cpath d='M0-9V9M-7.8-4.5 7.8 4.5M-7.8 4.5 7.8-4.5'/%3E%3C/g%3E%3Cg transform='translate(88 228) scale(.9)'%3E%3Cpath d='M0-9V9M-7.8-4.5 7.8 4.5M-7.8 4.5 7.8-4.5'/%3E%3C/g%3E%3Ccircle cx='275' cy='230' r='1.8' fill='%23C9A35B' fill-opacity='.38' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: no-preference) {
  html[data-tema="navidad"] body.pagina::before {
    animation: nav-copos 34s linear infinite;
  }
}

@keyframes nav-copos {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 220px, 60px 310px; }
}

/* Cabecera con guirnalda de luces cálidas */
html[data-tema="navidad"] .cabecera {
  padding-top: 1.95rem;
}

html[data-tema="navidad"] .cabecera::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 28px;
  pointer-events: none;
  z-index: 2;
  background-repeat: repeat-x;
  background-position: top center;
  background-size: 160px 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='28' viewBox='0 0 160 28'%3E%3Cpath d='M0 2Q40 16 80 2Q120 16 160 2' fill='none' stroke='%23F5CF86' stroke-opacity='.55' stroke-width='1.4'/%3E%3Cg%3E%3Ccircle cx='22' cy='11' r='6.5' fill='%23FFE7A8' fill-opacity='.28'/%3E%3Ccircle cx='22' cy='11' r='3' fill='%23FFF2C6'/%3E%3Ccircle cx='58' cy='10' r='6.5' fill='%23D63A42' fill-opacity='.3'/%3E%3Ccircle cx='58' cy='10' r='3' fill='%23E8565E'/%3E%3Ccircle cx='102' cy='10' r='6.5' fill='%233CA37C' fill-opacity='.3'/%3E%3Ccircle cx='102' cy='10' r='3' fill='%2363C9A2'/%3E%3Ccircle cx='138' cy='11' r='6.5' fill='%23FFE7A8' fill-opacity='.28'/%3E%3Ccircle cx='138' cy='11' r='3' fill='%23FFF2C6'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: no-preference) {
  html[data-tema="navidad"] .cabecera::before {
    animation: nav-luces 3.6s ease-in-out infinite alternate;
  }
}

@keyframes nav-luces {
  0%   { opacity: .82; }
  100% { opacity: 1; }
}

html[data-tema="navidad"] .cabecera::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 26' preserveAspectRatio='none'%3E%3Cpath d='M0 20Q60 0 130 12T270 10T400 8V26H0Z' fill='%23FCF6EA'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

html[data-tema="navidad"] .cabecera > img.logo,
html[data-tema="navidad"] .insignia-marco {
  box-shadow: 0 0 0 2px rgba(245, 207, 134, .82), 0 0 0 5px rgba(139, 30, 36, .42), 0 10px 20px rgba(0, 0, 0, .4);
}

@media (max-width: 719px) {
  html[data-tema="navidad"] .cabecera {
    padding-top: 1.15rem;
    padding-bottom: 1.55rem;
  }
  html[data-tema="navidad"] .cabecera::before {
    height: 20px;
    background-size: 128px 20px;
  }
}

html[data-tema="navidad"] .insignia-letrero {
  background: rgba(139, 30, 36, .55);
  border-color: rgba(245, 207, 134, .7);
  color: var(--oro-claro);
}

/* Acentos rojo arándano y verde pino en paneles, rótulos y navegación */
html[data-tema="navidad"] .panel.hoja::after {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Ccircle cx='24' cy='9' r='2.6' fill='%23D63A42'/%3E%3Ccircle cx='28' cy='13' r='2.2' fill='%23F5CF86'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
    linear-gradient(135deg, #1A725A, #0E382D);
}

html[data-tema="navidad"] .rotulo::before {
  background: linear-gradient(90deg, var(--vino), var(--sol-oro));
}

html[data-tema="navidad"] .tarjeta-destacada::before {
  background: linear-gradient(90deg, var(--verde), var(--sol-oro), var(--vino));
}

html[data-tema="navidad"] .pestanas button[aria-selected="true"],
html[data-tema="navidad"] .pestanas [role="tab"][aria-selected="true"] {
  background: linear-gradient(180deg, #165443, var(--bosque));
  box-shadow: 0 4px 12px -4px rgba(14, 56, 45, .6), inset 0 0 0 1px rgba(245, 207, 134, .4);
}

html[data-tema="navidad"] .nav-inferior-item[aria-selected="true"]::before,
html[data-tema="navidad"] .nav-inferior-item[aria-current="page"]::before,
html[data-tema="navidad"] .nav-inferior-item.activo::before {
  background: linear-gradient(90deg, var(--vino), var(--sol-oro));
}

/* Avisos, premio y confirmación de caja con toque festivo */
html[data-tema="navidad"] .aviso-premio,
html[data-tema="navidad"] .aviso-inline,
html[data-tema="navidad"] .aviso-cambio,
html[data-tema="navidad"] .cj-listo,
html[data-tema="navidad"] .cj-nota {
  background: linear-gradient(90deg, #FDF0E0, #F7E1CA);
  border-left-color: var(--vino);
}

html[data-tema="navidad"] .cj-banner-canje {
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 207, 134, .28), transparent 55%),
    linear-gradient(155deg, #A6262D, var(--vino) 58%, #5A1116);
}

html[data-tema="navidad"] .dialogo,
html[data-tema="navidad"] .modal-pantalla-caja {
  border-top-color: var(--vino);
}

/* El QR siempre conserva fondo blanco puro y máximo contraste */
html[data-tema="navidad"] .qr-pantalla,
html[data-tema="navidad"] .cj-qr {
  background: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  html[data-tema="navidad"] body.pagina::before,
  html[data-tema="navidad"] .cabecera::before {
    animation: none !important;
  }
}
