/* Efectos del panel cuando el diseño vigente es de Navidad */

/* ── Nieve ──────────────────────────────────────────────────── */
.nv-nieve { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; z-index: 900; }
.nv-copo { position: absolute; top: -30px; color: #8ec5f4; text-shadow: 0 0 5px rgba(255, 255, 255, .9), 0 0 2px rgba(60, 120, 190, .5); line-height: 1; animation: nv-caer linear infinite; will-change: transform; }
.nv-copo i { display: block; font-style: normal; animation: nv-mecer ease-in-out infinite alternate; }
@keyframes nv-caer { from { transform: translateY(0); } to { transform: translateY(110vh); } }
@keyframes nv-mecer { from { transform: translateX(-18px) rotate(0deg); } to { transform: translateX(18px) rotate(180deg); } }

/* ── Bienvenida con luces ───────────────────────────────────── */
.panel.navidad .panel-bienvenida {
    position: relative;
    padding-top: 32px;
    overflow: hidden;
    background: linear-gradient(120deg, #7f0d12 0%, #b3161d 45%, #14612c 100%);
}

.nv-luces { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-around; border-top: 2px solid rgba(0, 0, 0, .35); }
.nv-luces b { width: 13px; height: 18px; margin-top: 1px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; color: #ffd447; background: currentColor; animation: nv-titilar 1.4s ease-in-out infinite; }
.nv-luces b:nth-child(4n+2) { color: #ff5a5a; animation-delay: .35s; }
.nv-luces b:nth-child(4n+3) { color: #5ee07a; animation-delay: .7s; }
.nv-luces b:nth-child(4n+4) { color: #5ac8ff; animation-delay: 1.05s; }
@keyframes nv-titilar { 0%, 100% { opacity: 1; box-shadow: 0 0 10px 3px currentColor; } 50% { opacity: .35; box-shadow: none; } }

.panel .panel-bienvenida .nv-gorro { display: inline-block; margin-right: 10px; font-size: 32px; vertical-align: middle; transform-origin: 50% 90%; animation: nv-balanceo 2.4s ease-in-out infinite; }
@keyframes nv-balanceo { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }

.nv-lateral { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel .panel-bienvenida .nv-contador { padding: 6px 14px; border-radius: 20px; background: #ffd447; color: #6b1a00; font-weight: bold; text-shadow: none; white-space: nowrap; }
.nv-cronometro { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.panel .panel-bienvenida .nv-titulo { margin-right: 2px; color: #fff; font-size: 11px; font-weight: bold; white-space: nowrap; }
.panel .panel-bienvenida .nv-arbol { margin-right: 5px; font-size: 24px; vertical-align: middle; }
.panel .panel-bienvenida .nv-unidad { display: block; text-align: center; }
.panel .panel-bienvenida .nv-unidad small { display: block; margin-top: 6px; color: #fff; font-size: 8px; font-weight: bold; letter-spacing: 1px; line-height: 1.2; text-transform: uppercase; }

/* hojas que caen (flip down); la tarjeta mide 42x40 y cada hoja la mitad de alto */
.nv-flip { position: relative; display: block; width: 42px; height: 40px; border-radius: 5px; perspective: 170px; box-shadow: 0 2px 0 #e6dcc3, 0 3px 0 #a99f88, 0 4px 0 #d8ceb5, 0 6px 10px rgba(0, 0, 0, .3); }
.nv-hoja { position: absolute; left: 0; display: block; width: 100%; height: 20px; overflow: hidden; backface-visibility: hidden; }
.nv-arriba { top: 0; border-radius: 5px 5px 0 0; background: linear-gradient(#fffdf6, #efe7d2); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28); transform-origin: 50% 100%; }
.nv-abajo { bottom: 0; border-radius: 0 0 5px 5px; background: linear-gradient(#f8f1df, #fffdf6); box-shadow: inset 0 1px 0 #fff; transform-origin: 50% 0; }
.panel .panel-bienvenida .nv-hoja i { position: absolute; left: 0; display: block; width: 100%; height: 40px; color: #a3141b; font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; font-size: 25px; font-style: normal; font-weight: bold; line-height: 40px; text-align: center; text-shadow: none; font-variant-numeric: tabular-nums; }
.nv-arriba i { top: 0; }
.nv-abajo i { bottom: 0; }
/* eje de las hojas */
.nv-flip::before, .nv-flip::after { content: ""; position: absolute; top: 16px; z-index: 3; width: 3px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #8a6a12, #ffd447, #8a6a12); }
.nv-flip::before { left: -2px; }
.nv-flip::after { right: -2px; }
.nv-cae, .nv-sube { visibility: hidden; z-index: 2; }
.nv-volteando .nv-cae { visibility: visible; animation: nv-caer-hoja .32s ease-in forwards; }
.nv-volteando .nv-sube { visibility: visible; animation: nv-abrir-hoja .32s cubic-bezier(.3, 1.4, .6, 1) .32s both; }
@keyframes nv-caer-hoja { from { transform: rotateX(0deg); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(.65); } }
@keyframes nv-abrir-hoja { from { transform: rotateX(90deg); filter: brightness(.65); } to { transform: rotateX(0deg); filter: brightness(1); } }
.nv-quieto .nv-cae, .nv-quieto .nv-sube { display: none; }
html[data-av-tema="oscuro"] .nv-arriba { background: linear-gradient(#34343c, #26262d); box-shadow: inset 0 -1px 0 #000; }
html[data-av-tema="oscuro"] .nv-abajo { background: linear-gradient(#2c2c33, #383840); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
html[data-av-tema="oscuro"] .panel .panel-bienvenida .nv-hoja i { color: #ffd447; }
html[data-av-tema="oscuro"] .nv-flip { box-shadow: 0 2px 0 #26262d, 0 3px 0 #000, 0 4px 0 #202026, 0 6px 10px rgba(0, 0, 0, .5); }
.nv-boton { padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 20px; background: transparent; color: #fff; font-size: 12px; cursor: pointer; }
.nv-boton:hover, .nv-boton:focus { background: rgba(255, 255, 255, .18); }

/* ── Tarjetas ───────────────────────────────────────────────── */
.panel.navidad .menuPanelFavoritos > li { border-top-color: #b3161d; animation: nv-entrar .5s ease-out backwards; }
.panel.navidad .menuPanelFavoritos > li:nth-child(even) { border-top-color: #14612c; }
@keyframes nv-entrar { from { opacity: 0; } to { opacity: 1; } }

/* nieve acumulada en el borde superior */
.panel.navidad .menuPanelFavoritos > li::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 9px;
    background: radial-gradient(circle at 8px 0, #dcefff 8px, transparent 9px) repeat-x;
    background-size: 19px 9px;
    pointer-events: none;
    transition: height .25s;
}
/* destello que cruza la tarjeta */
.panel.navidad .menuPanelFavoritos > li::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: -80%;
    width: 50%;
    background: linear-gradient(100deg, transparent, rgba(255, 215, 100, .35), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}
.panel.navidad .menuPanelFavoritos > li:hover { border-color: #d4a017; box-shadow: 0 0 0 2px rgba(212, 160, 23, .35), 0 14px 30px rgba(179, 22, 29, .22); }
.panel.navidad .menuPanelFavoritos > li:hover::after { left: 140%; transition: left .8s ease; }
.panel.navidad .menuPanelFavoritos > li:hover .iconimage .pd { background: radial-gradient(circle, #fff6d6 40%, #fbe3e3 100%); box-shadow: 0 0 16px rgba(255, 200, 60, .75); }
.panel.navidad .menuPanelFavoritos > li:hover .iconimage img { animation: nv-sacudir .6s ease-in-out; }
@keyframes nv-sacudir { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }

/* ── Modo oscuro ────────────────────────────────────────────── */
html[data-av-tema="oscuro"] .panel.navidad .panel-bienvenida { background: linear-gradient(120deg, #4d0a0e 0%, #6e1117 45%, #0d3b1c 100%); }
html[data-av-tema="oscuro"] .panel.navidad .menuPanelFavoritos > li:hover .iconimage .pd { background: rgba(255, 212, 71, .18); }

/* ── Sin animaciones ────────────────────────────────────────── */
.nv-quieto .nv-nieve { display: none; }
.nv-quieto .panel.navidad *, .nv-quieto .panel.navidad *::before, .nv-quieto .panel.navidad *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
    .nv-nieve, .nv-boton { display: none; }
    .panel.navidad .panel-bienvenida, .panel.navidad *, .panel.navidad *::after { animation: none !important; transition: none !important; }
}
