/* Tema de Navidad: solo adornos fijos encima de la plataforma, sin animaciones y sin cambiar colores.
   Lo enciende tema-temporada.js poniendo la clase tema-navidad en <html>. */
:root {
    --tema-luces: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='34' viewBox='0 0 240 34'%3E%3Cpath d='M0 3 Q30 17 60 3 Q90 17 120 3 Q150 17 180 3 Q210 17 240 3' fill='none' stroke='%231c1c1a' stroke-width='2.5'/%3E%3Cg stroke='%231c1c1a' stroke-width='2'%3E%3Crect x='27' y='9' width='6' height='5' fill='%231c1c1a'/%3E%3Cellipse cx='30' cy='21' rx='6' ry='8' fill='%23E63946'/%3E%3Crect x='87' y='9' width='6' height='5' fill='%231c1c1a'/%3E%3Cellipse cx='90' cy='21' rx='6' ry='8' fill='%2316A34A'/%3E%3Crect x='147' y='9' width='6' height='5' fill='%231c1c1a'/%3E%3Cellipse cx='150' cy='21' rx='6' ry='8' fill='%23ffffff'/%3E%3Crect x='207' y='9' width='6' height='5' fill='%231c1c1a'/%3E%3Cellipse cx='210' cy='21' rx='6' ry='8' fill='%232D4590'/%3E%3C/g%3E%3C/svg%3E");
    --tema-gorro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'%3E%3Cpath d='M9 41 C10 18 30 5 46 10 C57 13 61 25 58 35 L50 31 C49 24 45 21 41 23 C47 29 51 36 53 43 Z' fill='%23E63946' stroke='%231c1c1a' stroke-width='3' stroke-linejoin='round'/%3E%3Crect x='3' y='38' width='54' height='13' rx='6.5' fill='%23fff' stroke='%231c1c1a' stroke-width='3'/%3E%3Ccircle cx='57' cy='37' r='6' fill='%23fff' stroke='%231c1c1a' stroke-width='3'/%3E%3C/svg%3E");
    --tema-nieve: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='26' viewBox='0 0 96 26'%3E%3Cpath d='M-2 2 H98 V11 Q88 25 76 13 Q66 4 54 12 Q42 27 30 13 Q18 3 8 12 Q2 16 -2 11 Z' fill='%23fff' stroke='%231c1c1a' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E");
    --tema-arbol: url("../assets/images/temas/navidad/arbol.png");
    --tema-yosel: url("../assets/images/temas/navidad/yosel.png");
}

/* ---------- Entrada (login) ---------- */

/* Guirnalda de luces bajo la barra de arriba */
html.tema-navidad .lg-barra { position: relative; }
html.tema-navidad .lg-barra::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 34px;
    background: var(--tema-luces) repeat-x center top;
    pointer-events: none;
    z-index: 3;
}

/* Gorro en la esquina del logo */
html.tema-navidad .lg-logo,
html.tema-navidad .almhead-logo-link { position: relative; }
html.tema-navidad .lg-logo::after,
html.tema-navidad .almhead-logo-link::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -22px;
    width: 50px;
    height: 44px;
    background: var(--tema-gorro) no-repeat center / contain;
    transform: rotate(-24deg);
    pointer-events: none;
    z-index: 2;
}

/* Nieve sobre la tarjeta, de borde a borde */
html.tema-navidad .lg-tarjeta::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 23px;
    border-radius: 13px 13px 0 0;
    background: var(--tema-nieve) round left -3px;
    background-repeat: round no-repeat;
    pointer-events: none;
    z-index: 1;
}
html.tema-navidad .lg-pegatina { z-index: 2; }

/* Arbolito en la esquina de abajo de la tarjeta */
html.tema-navidad .lg-tarjeta::after {
    content: '';
    position: absolute;
    right: -78px;
    bottom: -26px;
    width: 150px;
    height: 214px;
    background: var(--tema-arbol) no-repeat center bottom / contain;
    filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .18));
    pointer-events: none;
    z-index: 2;
}

/* Yosel de Papá Noel en lugar del astronauta */
html.tema-navidad .lg-mascota { content: var(--tema-yosel); width: 170px; }

/* Estrellas en rojo y verde */
html.tema-navidad .lg-estrella.e1,
html.tema-navidad .lg-estrella.e4 { color: #E63946 !important; }
html.tema-navidad .lg-estrella.e2,
html.tema-navidad .lg-estrella.e6 { color: #16A34A !important; }

@media (max-width: 1100px) {
    html.tema-navidad .lg-tarjeta::after { right: -10px; bottom: -18px; width: 84px; height: 120px; }
}

/* ---------- Dentro de la plataforma (todos los roles) ---------- */

/* Guirnalda bajo la cabecera amarilla */
html.tema-navidad .almhead { position: relative; }
html.tema-navidad .almhead::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 26px;
    background: var(--tema-luces) repeat-x center top;
    background-size: 180px 26px;
    pointer-events: none;
    z-index: 3;
}

/* Alumno: la guirnalda cuelga debajo de la franja negra de datos */
html.tema-navidad .almhead:has(~ .almenu-quick-stats)::after { display: none; }
html.tema-navidad .almenu-quick-stats { position: relative; }
html.tema-navidad .almenu-quick-stats::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 26px;
    background: var(--tema-luces) repeat-x center top;
    background-size: 180px 26px;
    pointer-events: none;
    z-index: 3;
}

/* El menú y el contenido bajan un poco para que la guirnalda no pise el buscador ni el botón «Menú» */
html.tema-navidad .dash-sidebar { padding-top: 30px; }
html.tema-navidad .dash-sidebar > :first-child { margin-top: 20px; }
html.tema-navidad .dash-main { padding-top: 14px; }
html.tema-navidad .mobile-nav-toggle { margin-top: 18px; }

/* Arbolito en la tarjeta del saludo del Inicio, entre el texto y el tiempo */
html.tema-navidad .inicio-saludo { min-height: 104px; }
html.tema-navidad .inicio-saludo-texto { position: relative; padding-right: 110px; }
html.tema-navidad .inicio-saludo-texto::after {
    content: '';
    position: absolute;
    right: 18px;
    bottom: -4px;
    width: 70px;
    height: 100px;
    background: var(--tema-arbol) no-repeat center bottom / contain;
    pointer-events: none;
}

/* Yosel de Papá Noel en las pantallas vacías */
html.tema-navidad .yosel-vacio-img { content: var(--tema-yosel); object-fit: contain; }

/* ---------- Pizarra del aula (emisor) ---------- */

html.tema-navidad body.role-emisor .piz-mascota { content: var(--tema-yosel); align-self: center; object-position: center; }
html.tema-navidad .piz-saludo { position: relative; }
html.tema-navidad .piz-saludo .inicio-saludo-texto::after { display: none; }
html.tema-navidad .piz-saludo::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 150px;
    height: 210px;
    background: var(--tema-arbol) no-repeat center bottom / contain;
    transform: translateY(-50%);
    pointer-events: none;
}
html.tema-navidad body.role-emisor .piz-saludo .inicio-saludo-texto { flex: 1 1 auto; text-align: center; padding-left: 200px; padding-right: 40px; }
html.tema-navidad body.role-emisor .piz-saludo .inicio-saludo-titulo { text-align: center !important; }
html.tema-navidad body.role-emisor .piz-frase { margin-left: auto; margin-right: auto; }
html.tema-navidad .piz-saludo .inicio-saludo-titulo::after {
    content: '¡Felices fiestas!';
    display: block;
    width: max-content;
    margin: 10px auto 0;
    padding: 4px 16px;
    font-size: .45em;
    color: #fff;
    background: #E63946;
    border: 3px solid #1c1c1a;
    border-radius: 10px;
    box-shadow: 4px 4px 0 #1c1c1a;
}

/* ---------- Móvil ---------- */

@media (max-width: 768px) {
    html.tema-navidad .lg-barra::after { height: 26px; background-size: 180px 26px; }
    html.tema-navidad .lg-logo::after,
    html.tema-navidad .almhead-logo-link::after { width: 38px; height: 34px; top: -15px; left: -16px; }
    html.tema-navidad .lg-mascota { width: 118px; }
    html.tema-navidad .lg-tarjeta::after { display: none; }
    html.tema-navidad .inicio-saludo { min-height: 0; }
    html.tema-navidad .inicio-saludo-texto { padding-right: 76px; }
    html.tema-navidad .inicio-saludo-texto::after { right: 10px; width: 50px; height: 72px; }
    html.tema-navidad .piz-saludo::after { width: 70px; height: 100px; left: 8px; }
    html.tema-navidad body.role-emisor .piz-saludo .inicio-saludo-texto { padding-left: 80px; padding-right: 16px; }
}

/* Opción para quitar o poner los adornos: oculta fuera de temporada */
[data-tema-temporada][hidden] { display: none !important; }
.alm-tema-btn { margin-right: 10px; }
