/* Tema natalino (2026-11-10, pedido do mestre): ativo até 26/12, liga sozinho
   via partials/head.php (data-natal no <html>). Só enfeite - não mexe em
   layout nem em funcionalidade. Desligável pelo botão 🎄 (localStorage). */

:root[data-natal] {
  --primary: #b3202f;
  --primary-dark: #7a1020;
  --heading: #8f1424;
  --accent: #c9a227;
  --accent-light: #e9cf6f;
  --success: #1f7a3a;
}
:root[data-natal][data-theme="dark"] {
  --primary: #e2505e;
  --primary-dark: #ff8a94;
  --heading: #ffb3ba;
  --accent: #e6c35c;
  --accent-light: #f3dc8c;
  --success: #4fbf72;
}

/* Faixa de luzinhas piscando no topo */
.natal-luzes {
  position: fixed; top: 0; left: 0; right: 0; height: 14px;
  pointer-events: none; z-index: 9998; overflow: hidden;
  display: flex; justify-content: space-around; align-items: flex-start;
}
.natal-luzes::before {
  content: ""; position: absolute; top: 3px; left: 0; right: 0; height: 2px;
  background: #2d5a27; opacity: .7;
}
.natal-luzes span {
  position: relative; top: 4px; width: 7px; height: 10px; border-radius: 50%;
  animation: natal-pisca 1.6s infinite ease-in-out;
}
.natal-luzes span:nth-child(4n+1) { background: #ff3b47; color: #ff3b47; }
.natal-luzes span:nth-child(4n+2) { background: #ffd23f; color: #ffd23f; animation-delay: .4s; }
.natal-luzes span:nth-child(4n+3) { background: #3ddc6b; color: #3ddc6b; animation-delay: .8s; }
.natal-luzes span:nth-child(4n+4) { background: #4aa8ff; color: #4aa8ff; animation-delay: 1.2s; }
@keyframes natal-pisca {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px 2px currentColor; }
  50% { opacity: .25; box-shadow: none; }
}

/* Neve */
.natal-neve { position: fixed; inset: 0; pointer-events: none; z-index: 9997; transition: opacity 2s; }

/* Gorrinho no logo + arvorezinha balançando */
.clinica-nav-brand { position: relative; }
:root[data-natal] .clinica-nav-brand::before {
  content: "🎅"; position: absolute; left: -.35em; top: -.75em; font-size: .9em;
  transform: rotate(-20deg); animation: natal-balanca 3s infinite ease-in-out;
}
@keyframes natal-balanca {
  0%, 100% { transform: rotate(-20deg); }
  50% { transform: rotate(-5deg) translateY(-2px); }
}

/* Cards com brilho dourado sutil ao passar o mouse */
:root[data-natal] .card { transition: box-shadow .3s, transform .3s; }
:root[data-natal] .card:hover { box-shadow: 0 0 0 1px var(--accent-light), 0 6px 18px rgba(201, 162, 39, .25); }

/* Saudação com brilho */
.natal-saudacao {
  /* dourado/branco: o banner do painel já é vermelho, verde/vermelho sumia */
  background: linear-gradient(90deg, #ffd23f, #ffffff, #f3dc8c, #ffd23f);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: natal-gradiente 6s linear infinite;
}
@keyframes natal-gradiente { to { background-position: 300% 0; } }

/* Botão flutuante para ligar/desligar */
.natal-botao {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent);
  background: var(--card); font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.2); animation: natal-pula 4s infinite;
}
.natal-botao[data-off] { opacity: .5; animation: none; filter: grayscale(1); }
@keyframes natal-pula { 0%, 90%, 100% { transform: none; } 94% { transform: translateY(-6px) rotate(-8deg); } 97% { transform: translateY(0) rotate(8deg); } }

/* Desligado pelo usuário: esconde os enfeites e volta as cores normais */
:root[data-natal-off] .natal-luzes, :root[data-natal-off] .natal-neve { display: none; }

/* Surpresa de 24 e 25/12 */
.natal-surpresa {
  position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  background: radial-gradient(circle, rgba(122,16,32,.92), rgba(20,40,20,.95));
  color: #fff; text-align: center; cursor: pointer; animation: natal-fade .5s;
}
.natal-presente { font-size: 96px; animation: natal-treme .5s 3; }
.natal-presente.aberto { animation: natal-abre .7s forwards; }
.natal-msg { font-size: 2rem; font-weight: 700; opacity: 0; transform: scale(.5); transition: all .6s cubic-bezier(.2,1.6,.4,1); }
.natal-msg.mostra { opacity: 1; transform: scale(1); }
.natal-msg small { display: block; font-size: 1rem; font-weight: 400; margin-top: .5rem; opacity: .85; }
.natal-confete { position: fixed; top: -20px; width: 10px; height: 14px; animation: natal-cai linear forwards; }
@keyframes natal-fade { from { opacity: 0; } }
@keyframes natal-treme { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes natal-abre { 50% { transform: scale(1.4); } 100% { transform: scale(0); opacity: 0; } }
@keyframes natal-cai { to { transform: translateY(110vh) rotate(720deg); } }

/* Papai Noel escalando a corda no canto direito (2026-11-10) */
/* 2026-11-10 (2): corda virou escadinha de madeira + chaminé de tijolos */
.natal-escalada { position: fixed; top: 6px; right: 4px; bottom: 0; width: 72px; pointer-events: none; z-index: 9996; }
.natal-chamine { position: absolute; top: 6px; right: 2px; width: 68px; z-index: 2; line-height: 0; animation: natal-fade .6s; }
.natal-escada {
  position: absolute; top: 52px; bottom: 0; right: 12px; width: 46px; z-index: 0;
  background:
    linear-gradient(90deg, #6e4520 0 2px, #9a6634 2px 6px, transparent 6px calc(100% - 6px), #9a6634 calc(100% - 6px) calc(100% - 2px), #6e4520 calc(100% - 2px)),
    repeating-linear-gradient(180deg, transparent 0 17px, #7d5028 17px 18px, #b07a42 18px 22px, #6e4520 22px 23px);
  transform-origin: top; animation: natal-escada-desce 1.6s ease-out;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,.25));
}
@keyframes natal-escada-desce { from { transform: scaleY(0); } }
.natal-fumaca { position: absolute; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: rgba(200,200,210,.75); animation: natal-fumaca 3.5s infinite ease-out; }
.natal-fumaca:nth-child(2) { left: 26px; animation-delay: 1.2s; }
.natal-fumaca:nth-child(3) { left: 34px; animation-delay: 2.3s; }
.natal-fumaca:nth-child(1) { left: 30px; }
@keyframes natal-fumaca { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(-14px, -40px) scale(2.2); } }
.natal-escalada .natal-noel { z-index: 1; }
.natal-noel.entra { animation: natal-entra 1.1s ease-in forwards; }
@keyframes natal-entra {
  0% { transform: translateY(calc(-100vh + 150px)); }
  45% { transform: translateY(calc(-100vh + 70px)) scale(.85); }
  100% { transform: translateY(calc(-100vh + 125px)) scale(.6); opacity: 0; }
}
.natal-fuligem { position: absolute; top: 2px; left: 18px; width: 30px; height: 20px; border-radius: 50%; background: rgba(90,90,100,.6); animation: natal-fuligem .9s ease-out forwards; z-index: 3; }
@keyframes natal-fuligem { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.4) translateY(-12px); opacity: 0; } }
.natal-noel {
  position: absolute; right: 2px; bottom: 0; line-height: 0;
  animation: natal-sobe 28s linear forwards;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.3));
}
.natal-noel span { display: inline-block; animation: natal-escala .9s infinite alternate ease-in-out; transform-origin: 50% 15%; }
.natal-noel .na-braco, .natal-noel .na-perna { transform-box: fill-box; animation: natal-puxa .45s infinite alternate ease-in-out; }
.natal-noel .na-braco { transform-origin: 50% 100%; }
.natal-noel .na-perna { transform-origin: 50% 0; }
.natal-noel .na-braco.na-dir, .natal-noel .na-perna.na-esq { animation-delay: -.45s; }
.natal-noel .na-saco { transform-box: fill-box; transform-origin: 30% 10%; animation: natal-escala .9s infinite alternate-reverse ease-in-out; }
.natal-noel.chegou span { animation: natal-pulinho .35s 4 alternate; }
.natal-noel.chegou .na-braco.na-dir { animation: natal-tchau .25s infinite alternate; }
.natal-noel.chegou::after { content: "Ho ho ho! 👋"; position: absolute; right: 50px; top: 4px; white-space: nowrap; font: 700 13px/1.2 sans-serif; background: #fff; color: #b3202f; padding: 4px 8px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
@keyframes natal-sobe { from { transform: translateY(0); } to { transform: translateY(calc(-100vh + 150px)); } }
@keyframes natal-escala { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes natal-puxa { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@keyframes natal-pulinho { to { transform: translateY(-4px); } }
@keyframes natal-tchau { from { transform: translate(4px, -6px) rotate(-25deg); } to { transform: translate(4px, -6px) rotate(25deg); } }
@keyframes natal-acena { from { transform: rotate(-15deg); } to { transform: rotate(15deg); } }
.natal-brilho { position: fixed; pointer-events: none; z-index: 9996; color: #ffd23f; font-size: 12px; text-shadow: 0 0 6px #ffe680; animation: natal-brilha 1.6s ease-out forwards; }
@keyframes natal-brilha { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(18px) scale(.3) rotate(90deg); } }
.natal-escalada.saindo { transition: opacity 1s; opacity: 0; }
.natal-presente-cai { position: fixed; font-size: 22px; pointer-events: none; z-index: 9996; animation: natal-presente-cai 2.5s ease-in forwards; }
@keyframes natal-presente-cai { to { transform: translateY(110vh) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) {
  .natal-escalada { display: none; }
  .natal-luzes span, .natal-botao, .natal-saudacao, :root[data-natal] .clinica-nav-brand::before { animation: none; }
  .natal-neve { display: none; }
}
@media print { .natal-luzes, .natal-neve, .natal-botao, .natal-surpresa { display: none !important; } }
