/* Layout de Navidad (inc/navidad-layout.php + js/navidad.js) */
:root { --nav-rojo: #d2232d; --nav-rojo-o: #a8141f; --nav-verde: #168048; --nav-dorado: #f4c430; --nav-crema: #fffaf2; }

/* Nieve: lienzo encima de todo el contenido pero debajo de las ventanas emergentes; no recibe clics */
#nav-nieve { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1035; }

/* Guirnalda de luces arriba de la pantalla */
#nav-luces { position: fixed; top: -6px; left: 0; right: 0; height: 30px; pointer-events: none; z-index: 1036; display: flex; justify-content: space-around; overflow: hidden; }
#nav-luces::before { content: ""; position: absolute; left: -2%; right: -2%; top: 0; height: 16px; border-bottom: 2px solid #2f4f3a; border-radius: 0 0 50% 50% / 0 0 100% 100%; opacity: .55; }
#nav-luces i { position: relative; top: 13px; width: 9px; height: 13px; border-radius: 50% 50% 45% 45%; background: var(--c); box-shadow: 0 0 8px 2px var(--c); animation: nav-brillo 1.6s ease-in-out infinite; animation-delay: var(--d); }
#nav-luces i::before { content: ""; position: absolute; top: -4px; left: 2px; width: 5px; height: 5px; background: #3b4a40; border-radius: 1px; }
@keyframes nav-brillo { 0%, 100% { opacity: 1; filter: brightness(1.15); } 50% { opacity: .35; filter: brightness(.7); box-shadow: none; } }

/* Gorro de Santa sobre la foto del usuario (arriba a la derecha) */
.nav-con-gorro { position: relative; display: inline-block; line-height: 0; }
.nav-gorro { position: absolute; width: 30px; height: 26px; top: -15px; left: -7px; transform: rotate(-18deg); pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }

/* Cuenta regresiva en la barra de arriba */
#nav-cuenta { width: auto !important; flex: 0 0 auto; max-width: none; align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--nav-rojo-o); background: #fdecec; border: 1px solid #f7c9cc; border-radius: 20px; padding: 4px 10px; margin-right: 10px; white-space: nowrap; cursor: default; }
#nav-cuenta b { color: var(--nav-verde); }
@media (max-width: 900px) { #nav-cuenta { display: none; } }

/* Botones para apagar/encender la nieve y las luces */
#nav-luces[hidden] { display: none; }
#nav-botones { position: fixed; left: 14px; bottom: 14px; z-index: 1037; display: inline-flex; gap: 6px; }
.nav-boton { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.18); font-size: 18px; line-height: 38px; text-align: center; cursor: pointer; padding: 0; }
.nav-boton:hover { transform: scale(1.06); }
.nav-boton.apagado { opacity: .45; filter: grayscale(1); }
#nav-botones.en-barra { position: static; width: auto !important; flex: 0 0 auto; max-width: none; align-self: center; margin: 0 10px 0 -4px; gap: 4px; }
#nav-botones.en-barra .nav-boton { width: 30px; height: 30px; line-height: 30px; font-size: 15px; background: #fdecec; border: 1px solid #f7c9cc; box-shadow: none; }
#nav-botones.en-barra .nav-boton:hover { background: #fbdcdc; transform: none; }
@media (max-width: 900px) { #nav-botones.en-barra { margin-left: 0; } }

/* Santa que se asoma abajo a la derecha */
#nav-santa { position: fixed; right: 18px; bottom: -260px; z-index: 1038; display: flex; align-items: flex-end; gap: 4px; transition: bottom .9s cubic-bezier(.2, 1.3, .4, 1); }
#nav-santa.visible { bottom: -12px; }
#nav-santa .nav-personaje { width: 150px; height: 168px; display: block; cursor: pointer; transform-origin: 50% 100%; }
/* Al salir: brinco de alegría y luego se balancea; el brazo saluda rápido al principio y después más suave */
#nav-santa.visible .nav-personaje, .nav-anima.visible .nav-personaje { animation: nav-brinco .9s cubic-bezier(.3, 1.5, .5, 1) .5s both, nav-balanceo 2.6s ease-in-out 1.4s infinite; }
@keyframes nav-brinco { 0% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(6px) scale(1.06, .92); } 55% { transform: translateY(-22px) scale(.96, 1.05); } 80% { transform: translateY(0) scale(1.04, .96); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes nav-balanceo { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
#nav-santa .mano, .nav-anima.visible .mano { animation: nav-hola .28s ease-in-out 1s 8 alternate, nav-mano .7s ease-in-out 3.3s infinite alternate; }
@keyframes nav-hola { from { transform: rotate(-24deg); } to { transform: rotate(22deg); } }
@keyframes nav-mano { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
.nav-chispa { position: absolute; font-size: 16px; opacity: 0; pointer-events: none; }
#nav-santa.visible .nav-chispa { animation: nav-chispa 1.6s ease-out 1s 2; }
.nav-chispa.c1 { right: 128px; bottom: 140px; } .nav-chispa.c2 { right: 8px; bottom: 150px; animation-delay: 1.3s !important; } .nav-chispa.c3 { right: 70px; bottom: 172px; font-size: 13px; animation-delay: 1.6s !important; }
@keyframes nav-chispa { 0% { opacity: 0; transform: scale(.3) translateY(8px); } 30% { opacity: 1; transform: scale(1.1) translateY(0); } 100% { opacity: 0; transform: scale(.8) translateY(-14px); } }
.nav-globo { position: relative; margin-bottom: 120px; max-width: 250px; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(15,23,42,.22); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #24313f; font-size: 13.5px; line-height: 1.35; }
.nav-globo::after { content: ""; position: absolute; right: -9px; bottom: 22px; border: 10px solid transparent; border-left-color: #fff; border-right: 0; }
.nav-globo b { color: var(--nav-rojo); }
.nav-globo.ancho { max-width: 300px; }
.nav-etiqueta { display: inline-block; font-size: 11px; font-weight: 800; color: #5b3fa8; background: #efe9fb; border-radius: 20px; padding: 1px 8px; margin: 4px 0 2px; }
.nav-pregunta { font-weight: 700; font-size: 14px; margin: 2px 0 8px; }
.nav-resp { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-resp.col { flex-direction: column; flex-wrap: nowrap; }
.nav-resp button:not(.nav-btn) { border: 1px solid #e3e7ec; background: #f7f9fa; border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #24313f; }
.nav-resp button:not(.nav-btn):hover { background: #e6f5f6; border-color: #4fb8c0; }
.nav-input { width: 100%; border: 1px solid #cfd8e3; border-radius: 9px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.nav-lista { max-height: 150px; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.nav-lista button { text-align: left; }
.nav-mini { font-size: 12px; color: #7d8a99; }
.nav-error { color: var(--nav-rojo); font-size: 12px; }
.nav-error:empty { display: none; }
.nav-globo .acciones { display: flex; gap: 6px; margin-top: 9px; }
.nav-btn { border: 0; border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; background: var(--nav-rojo); color: #fff; }
.nav-btn:hover { background: var(--nav-rojo-o); }
.nav-btn.claro { background: #f1f3f6; color: #52606d; }
.nav-btn.claro:hover { background: #e4e8ee; }

/* Ventana del deseo */
#nav-modal { position: fixed; inset: 0; z-index: 1060; display: none; align-items: center; justify-content: center; background: rgba(15, 23, 42, .55); padding: 16px; }
#nav-modal.abierto { display: flex; }
.nav-carta { position: relative; width: min(460px, 100%); background: var(--nav-crema); border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 25px 60px rgba(0,0,0,.35); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #24313f; border: 6px solid transparent;
    background-image: linear-gradient(var(--nav-crema), var(--nav-crema)), repeating-linear-gradient(45deg, var(--nav-rojo) 0 12px, #fff 12px 24px, var(--nav-verde) 24px 36px, #fff 36px 48px);
    background-origin: border-box; background-clip: padding-box, border-box; }
.nav-carta h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; color: var(--nav-rojo-o); }
.nav-carta p { font-size: 13.5px; color: #52606d; margin: 0 0 12px; }
.nav-carta textarea { width: 100%; min-height: 110px; border: 1px solid #e3d9c8; border-radius: 12px; padding: 10px 12px; font-size: 14px; background: #fff; resize: vertical; font-family: inherit; }
.nav-carta textarea:focus { outline: 2px solid #f4c430; border-color: #f4c430; }
.nav-carta .pie { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 8px; }
.nav-carta .contador { font-size: 11.5px; color: #8a96a3; }
.nav-carta .cerrar { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 22px; color: #8a96a3; cursor: pointer; }
.nav-carta .error { color: var(--nav-rojo); font-size: 12.5px; margin-top: 6px; }
.nav-carta .listo { text-align: center; padding: 10px 0 4px; }
.nav-carta .listo .grande { font-size: 44px; line-height: 1; }

@media (max-width: 600px) {
    #nav-santa .nav-personaje { width: 112px; height: 126px; }
    .nav-globo { margin-bottom: 85px; max-width: 190px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
    #nav-luces i, #nav-santa .nav-personaje, #nav-santa.visible .nav-personaje, #nav-santa .mano, .nav-chispa { animation: none !important; }
}

/* Respuesta del equipo al deseo (la entrega el muñeco de Blumbox) */
.nav-etiqueta.verde { color: #168048; background: #e4f5ea; }
.nav-cita { font-style: italic; color: #7d8a99; font-size: 12.5px; margin: 4px 0 6px; }
.nav-respuesta { font-size: 14px; font-weight: 600; white-space: pre-wrap; background: #f3fbfb; border-left: 3px solid #38b8c2; border-radius: 8px; padding: 7px 10px; }
.nav-firma { font-size: 12px; color: #369aa2; font-weight: 700; text-align: right; margin-top: 5px; }
/* El muñeco sostiene el regalo: lo mueve suave en vez de saludar */
#nav-santa[data-personaje="blumbox"] .mano { animation: nav-regalo .9s ease-in-out 1s infinite alternate; }
@keyframes nav-regalo { from { transform: rotate(-7deg); } to { transform: rotate(6deg); } }
