/* =========================================================
   Christmas theme — snowfall on banner, hanging ornaments, corner Santa
   Remove this file + js/xmas.js (and their two include tags) after the season.
   ========================================================= */

/* ---------- Banner snow ---------- */
.header-wrapper.xmas-on {
   position: relative;
   overflow: hidden;
}

.header-wrapper.xmas-on .page-title {
   position: relative;
   z-index: 3;
}

#xmas-snow {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: 2;
}

@keyframes xmas-wave {
   from { transform: rotate(-10deg); }
   to   { transform: rotate(18deg); }
}

/* ---------- Hanging ornaments ---------- */
.xmas-hang {
   position: absolute;
   inset: 0;
   pointer-events: none;
   z-index: 2;
}

.xmas-orn {
   position: absolute;
   top: 0;
   display: flex;
   flex-direction: column;
   align-items: center;
   transform-origin: 50% 0;
   animation: xmas-swing var(--dur, 3s) ease-in-out var(--delay, 0s) infinite alternate,
              xmas-fadein 1s ease-out both;
   filter: drop-shadow(0 6px 8px rgba(0, 40, 60, .22));
}

.xmas-orn svg { display: block; height: auto; margin-top: -2px; }

.xmas-string {
   display: block;
   width: 1.5px;
   height: var(--len, 150px);
   background: linear-gradient(to bottom, rgba(255, 236, 170, .55), #e2bd5e);
}

@keyframes xmas-swing {
   from { transform: rotate(-3.5deg); }
   to   { transform: rotate(3.5deg); }
}

@keyframes xmas-fadein {
   from { opacity: 0; }
   to   { opacity: 1; }
}

/* ---------- Corner Santa ---------- */
.xmas-santa {
   position: fixed;
   left: 14px;
   bottom: 0;
   width: 104px;
   z-index: 900;
   transform: translateY(110%);
   transition: transform .9s cubic-bezier(.2, 1.3, .4, 1);
   cursor: pointer;
   -webkit-tap-highlight-color: transparent;
}

.xmas-santa.is-in { transform: translateY(6px); }
.xmas-santa.is-gone { transform: translateY(120%); transition-duration: .5s; }

.xmas-santa svg { display: block; width: 100%; height: auto; overflow: visible; }

.xmas-santa .xm-wave {
   transform-box: fill-box;
   transform-origin: 10% 90%;
   animation: xmas-wave .6s ease-in-out infinite alternate;
}

.xmas-santa .xm-body {
   transform-box: fill-box;
   transform-origin: bottom center;
   animation: xmas-sway 3s ease-in-out infinite;
}

@keyframes xmas-sway {
   0%, 100% { transform: rotate(-2deg); }
   50%      { transform: rotate(2deg); }
}

.xmas-bubble {
   position: absolute;
   left: 84px;
   bottom: 118px;
   width: max-content;
   max-width: 210px;
   background: #fff;
   color: #c8102e;
   font-family: 'Poppins', sans-serif;
   font-weight: 600;
   font-size: 14px;
   line-height: 1.35;
   padding: 9px 14px;
   border-radius: 14px;
   box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
   opacity: 0;
   transform: translateY(8px) scale(.9);
   transform-origin: bottom left;
   transition: opacity .35s, transform .35s;
   pointer-events: none;
}

.xmas-bubble::after {
   content: "";
   position: absolute;
   left: 14px;
   bottom: -8px;
   border-width: 9px 9px 0 0;
   border-style: solid;
   border-color: #fff transparent transparent transparent;
}

.xmas-bubble small {
   display: block;
   color: #1d7a4b;
   font-weight: 500;
   font-size: 12px;
}

.xmas-santa.talk .xmas-bubble,
.xmas-santa:hover .xmas-bubble {
   opacity: 1;
   transform: none;
}

.xmas-close {
   position: absolute;
   top: -4px;
   right: -6px;
   width: 22px;
   height: 22px;
   border: 0;
   border-radius: 50%;
   background: rgba(0, 0, 0, .55);
   color: #fff;
   font-size: 14px;
   line-height: 22px;
   text-align: center;
   padding: 0;
   cursor: pointer;
   opacity: 0;
   transition: opacity .2s;
}

.xmas-santa:hover .xmas-close,
.xmas-santa:focus-within .xmas-close { opacity: 1; }

@media (hover: none) {
   .xmas-close { opacity: 1; }
}

@media screen and (max-width: 768px) {
   .xmas-santa { width: 84px; left: 6px; }
   .xmas-bubble { left: 66px; bottom: 96px; font-size: 12px; max-width: 170px; }
}

/* No corner Santa on mobile */
@media screen and (max-width: 767px) {
   .xmas-santa { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
   .xmas-orn { animation: none; }
   .xmas-santa .xm-wave,
   .xmas-santa .xm-body { animation: none; }
}
