/* TMC Advent Calendar - christmas skin. Decoration only; scoped under .tmc-ac-ui. Nothing here is clickable or focusable.
   Layers: .tmc-ac-xm sits behind the content (z-index -1); .tmc-ac-xm-lane is a flex item of the header row (free space only);
   .tmc-ac-xm-foot is in the flow after the last row of doors. Motion uses transform and opacity only. */
.tmc-ac-ui .tmc-ac-xm,.tmc-ac-ui .tmc-ac-xm-lane,.tmc-ac-ui .tmc-ac-xm-foot{pointer-events:none;-webkit-user-select:none;user-select:none}
.tmc-ac-ui .tmc-ac-xm{position:absolute;left:0;right:0;top:0;bottom:0;z-index:-1;overflow:hidden;container-type:size}
.tmc-ac-ui .tmc-ac-xm-defs{position:absolute;width:0;height:0}

/* snow: fine dust plus a few real flakes in three sizes */
.tmc-ac-ui .tmc-ac-xm-snow{position:absolute;left:0;right:0;top:-360px;bottom:0;background-image:radial-gradient(2.4px 2.4px at 30px 40px,rgba(255,255,255,.9) 50%,transparent 53%),radial-gradient(1.6px 1.6px at 112px 150px,rgba(255,255,255,.7) 50%,transparent 53%),radial-gradient(2.8px 2.8px at 160px 92px,rgba(255,255,255,.5) 50%,transparent 53%),radial-gradient(1.4px 1.4px at 72px 118px,rgba(255,255,255,.8) 50%,transparent 53%);background-size:180px 180px;animation:tmc-ac-fall 16s linear infinite}
@keyframes tmc-ac-fall{to{transform:translate3d(0,360px,0)}}
.tmc-ac-ui .tmc-ac-xm-fl{position:absolute;top:-24px;opacity:0;filter:drop-shadow(0 0 2px rgba(255,255,255,.55));animation:tmc-ac-drop var(--dur,24s) linear var(--dl,0s) infinite}
@keyframes tmc-ac-drop{0%{transform:translate3d(0,0,0) rotate(0);opacity:0}8%{opacity:var(--op,.8)}92%{opacity:var(--op,.8)}100%{transform:translate3d(var(--sway,0px),calc(100cqh + 48px),0) rotate(200deg);opacity:0}}

/* string of lights */
.tmc-ac-ui .tmc-ac-xm-lights{position:absolute;left:4%;right:210px;top:0;height:30px}
.tmc-ac-ui .tmc-ac-xm-wire{position:absolute;left:0;right:0;top:-18px;height:36px;border-bottom:1.5px solid rgba(255,255,255,.3);border-radius:0 0 50% 50%/0 0 100% 100%}
.tmc-ac-ui .tmc-ac-xm-bulb{position:absolute;width:9px;height:12px;margin-left:-4px;border-radius:50% 50% 50% 50%/40% 40% 60% 60%;background:#ffb000;box-shadow:0 0 10px 3px rgba(255,176,0,.5);animation:tmc-ac-twinkle 3s ease-in-out infinite}
.tmc-ac-ui .tmc-ac-xm-bulb:nth-child(3n+2){background:#ff6b78;box-shadow:0 0 10px 3px rgba(255,107,120,.5);animation-delay:-1s}
.tmc-ac-ui .tmc-ac-xm-bulb:nth-child(3n+3){background:#6db6ff;box-shadow:0 0 10px 3px rgba(109,182,255,.5);animation-delay:-2s}
@keyframes tmc-ac-twinkle{50%{opacity:.45}}

/* Father Christmas peeks over the top edge of the title ticket (the ticket is painted above him) */
.tmc-ac-ui .tmc-ac-xm-santa{position:absolute;left:42px;top:3px;width:58px;height:auto;transform-origin:50% 100%;animation:tmc-ac-wave 5.4s ease-in-out infinite alternate}
@keyframes tmc-ac-wave{from{transform:rotate(-1.2deg)}to{transform:rotate(1.2deg) translate3d(0,-2px,0)}}

/* the flying team lives in the free part of the header row, left of the sound and close buttons */
.tmc-ac-ui .tmc-ac-xm-lane{position:relative;flex:1 1 0;min-width:0;height:40px;margin-left:86px;align-self:flex-end;overflow:hidden;container-type:inline-size}
.tmc-ac-ui .tmc-ac-xm-team{position:absolute;left:0;bottom:2px;display:flex;align-items:flex-end;gap:5px;left:1px;animation:tmc-ac-drift 14s ease-in-out infinite alternate}
@keyframes tmc-ac-drift{from{transform:translate3d(0,0,0)}to{transform:translate3d(3px,0,0)}}
.tmc-ac-ui .tmc-ac-xm-deer{display:block;flex:none;height:auto;animation:tmc-ac-bob 2.6s ease-in-out infinite alternate}
.tmc-ac-ui .tmc-ac-xm-d1{display:none}
.tmc-ac-ui .tmc-ac-xm-d2{width:38px;margin-bottom:2px;animation-delay:-.9s}
.tmc-ac-ui .tmc-ac-xm-d3{width:42px;animation-delay:-1.7s}
@keyframes tmc-ac-bob{from{transform:translate3d(0,-3px,0) rotate(-2.5deg)}to{transform:translate3d(0,2px,0) rotate(1.5deg)}}

/* layered snowdrifts along the bottom edge */
.tmc-ac-ui .tmc-ac-xm-drifts{position:absolute;left:0;bottom:0;width:100%;height:calc(34px + env(safe-area-inset-bottom,0px))}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-body{padding-bottom:calc(32px + env(safe-area-inset-bottom,0px))}

/* after the last row: pines, a reindeer and the presents, standing in the snow */
.tmc-ac-ui .tmc-ac-xm-foot{position:relative;height:52px;margin:0 -18px -14px}
.tmc-ac-ui .tmc-ac-xm-foot>*{position:absolute;bottom:0;display:block;height:auto}
.tmc-ac-ui .tmc-ac-xm-p1{left:5%;width:23px;height:37px}
.tmc-ac-ui .tmc-ac-xm-p2{left:calc(5% + 19px);width:18px;height:29px}
.tmc-ac-ui .tmc-ac-xm-p3{left:calc(5% + 35px);width:14px;height:22px}
.tmc-ac-ui .tmc-ac-xm-stag{height:auto;transform:scaleX(-1)}
.tmc-ac-ui .tmc-ac-xm-s1{left:27%;width:46px}
.tmc-ac-ui .tmc-ac-xm-s2{left:41%;width:54px;bottom:-3px}
.tmc-ac-ui .tmc-ac-xm-s3{left:57%;width:42px}
.tmc-ac-ui .tmc-ac-xm-gifts{right:5%;width:40px;bottom:-2px}

@media (min-width:560px){
.tmc-ac-ui .tmc-ac-xm-santa{left:52px;top:4px;width:64px}
.tmc-ac-ui .tmc-ac-xm-lane{margin-left:130px;height:46px}
.tmc-ac-ui .tmc-ac-xm-d1{display:block;width:40px;margin-bottom:6px}.tmc-ac-ui .tmc-ac-xm-d2{width:46px}.tmc-ac-ui .tmc-ac-xm-d3{width:52px}
.tmc-ac-ui .tmc-ac-xm-drifts{height:calc(56px + env(safe-area-inset-bottom,0px))}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-body{padding-bottom:calc(56px + env(safe-area-inset-bottom,0px))}
.tmc-ac-ui .tmc-ac-xm-foot{height:80px;margin:-18px -28px -18px}
.tmc-ac-ui .tmc-ac-xm-p1{left:6%;width:46px;height:74px}
.tmc-ac-ui .tmc-ac-xm-p2{left:calc(6% + 38px);width:34px;height:54px}
.tmc-ac-ui .tmc-ac-xm-p3{left:calc(6% + 68px);width:25px;height:40px}
.tmc-ac-ui .tmc-ac-xm-s1,.tmc-ac-ui .tmc-ac-xm-s3{display:none}
.tmc-ac-ui .tmc-ac-xm-s2{left:44%;width:78px;bottom:0}
.tmc-ac-ui .tmc-ac-xm-gifts{right:6%;width:66px}
}
/* phones: a slimmer sound button gives the reindeer room */
@media (max-width:559px){.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-sound{padding:0 11px;gap:6px}}
/* phones: the whole window fits the screen, tiles sized from the free height (never under 44px), a 70px scene strip under the grid */
@media (max-width:559px){
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-sub{margin-top:6px;font-size:13.5px}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-panel{margin-top:8px}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-status{margin-bottom:6px;padding:6px 14px;font-size:16px}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-btn{min-height:46px;padding-top:10px;padding-bottom:10px}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-btn2{min-height:44px;margin-top:6px;padding-top:9px;padding-bottom:9px}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-grid{--tw:max(52px,calc((100vh - 358px) / 6));--tw:max(52px,calc((100dvh - 358px) / 6));gap:8px;width:100%;max-width:calc(4 * var(--tw) + 3 * 8px + 12px);margin:2px auto 0;padding:4px 6px 0}
}
@media (min-width:360px) and (max-width:559px){.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media (max-width:359px){.tmc-ac-ui .tmc-ac-xm-lane{display:none}}
@media (max-width:319px){.tmc-ac-ui .tmc-ac-xm-santa{left:30px;width:44px}}

/* the admin preview ribbon sits where Father Christmas stands: he moves right of it */
.tmc-ac-ui .tmc-ac-dialog:has(.tmc-ac-ribbon) .tmc-ac-xm-santa{left:150px}
.tmc-ac-ui .tmc-ac-dialog:has(.tmc-ac-ribbon) .tmc-ac-xm-lane{display:none}

/* result card (win, no win, code, credit): a candy-cane edge along its top, nothing inside it changes */
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-card::before{content:"";position:absolute;left:0;right:0;top:0;height:7px;border-radius:20px 20px 0 0;background:repeating-linear-gradient(135deg,#d33c47 0 9px,#fff 9px 18px);background-color:#fff;pointer-events:none}

/* motion stops for people who ask for it: a still picture, flakes resting in the sky, the team parked in view */
@media (prefers-reduced-motion:reduce){
.tmc-ac-ui .tmc-ac-xm-snow,.tmc-ac-ui .tmc-ac-xm-bulb,.tmc-ac-ui .tmc-ac-xm-santa,.tmc-ac-ui .tmc-ac-xm-team,.tmc-ac-ui .tmc-ac-xm-deer{animation:none}
.tmc-ac-ui .tmc-ac-xm-fl{animation:none;top:var(--rest,20%);opacity:.4}
.tmc-ac-ui .tmc-ac-xm-team{transform:translate3d(8px,0,0)}
}
/* and nothing animates while the window is closed */
.tmc-ac-ui .tmc-ac-overlay[hidden] *{animation-play-state:paused!important}
/* many days: the grid takes the full width (the cap above is sized for the 4-column phone grid) */
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"] .tmc-ac-grid.is-dense{max-width:none;gap:6px;padding:4px 0 0}
/* a short screen with many days: the pines, reindeer and presents under the grid give their room to the grid (the snowdrift stays) */
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"].is-tight .tmc-ac-xm-foot{display:none}
.tmc-ac-ui .tmc-ac-dialog[data-skin="christmas"].is-tight .tmc-ac-body{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
