/* «Тайный Санта» (0.53, santa.js): the lobby button with its dot, the window (the sign-up, the recipient and the gift, the
   wait, the present box and its opening), the gift-mode bar over the shop. Cosy, not kitsch: a deep red, a gold ribbon,
   cream and pine, an ink line like the pets. */
.santa-modal, .santa-gbar { --santa-red: #b8352e; --santa-gold: #e8b64c; --santa-cream: #f4ede4; --santa-pine: #1f4a3f; --santa-ink: #3d2430; }

.santa-sheet { max-width: 480px; background: linear-gradient(180deg, #1d1a24 0, var(--panel, #14171e) 220px); }
.santa-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 18px; }
.santa-head b { flex: 1 1 auto; }
.santa-hat { width: 34px; height: 26px; flex: none; }
.santa-pv { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(232, 182, 76, .18); color: var(--santa-gold); }
.santa-pv[hidden] { display: none; }
.santa-x { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.santa-body { display: grid; gap: 10px; }
.santa-wait { height: 160px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.santa-gift { display: block; margin: 0 auto; width: 150px; height: auto; overflow: visible; }
.santa-gift.santa-small { width: 120px; }
.santa-gift.santa-big { width: min(220px, 60vw); }
.santa-sparks { opacity: 0; }
.santa-glow circle { opacity: 0; }
.santa-lead { margin: 0; text-align: center; font-size: 15px; line-height: 1.4; }
.santa-p { margin: 0; font-size: 14px; line-height: 1.45; text-align: center; }
.santa-small-p { margin: 0; text-align: center; color: var(--muted); font-size: 12px; }
.santa-rules { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; line-height: 1.4; color: #d6d9e0; }
.santa-count { margin: 0; text-align: center; color: var(--santa-gold); font-weight: 700; font-size: 13px; }
.santa-btns { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.santa-btns.santa-col button { width: 100%; }
.santa-primary { min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--accent); color: #111; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.santa-primary:disabled { opacity: .55; cursor: default; }
.santa-ghost { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.santa-ghost:disabled { opacity: .45; cursor: default; }
.santa-in { font-weight: 700; color: #7fd49b; }
.santa-to, .santa-from { display: flex; align-items: center; gap: 12px; justify-content: center; }
.santa-to > div, .santa-from > div { display: flex; flex-direction: column; min-width: 0; }
.santa-to small, .santa-from small { color: var(--muted); font-size: 12px; }
.santa-to b, .santa-from b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.santa-ava { border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--santa-gold); background: #2a2430; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--santa-cream); }
.santa-label { font-size: 12px; color: var(--muted); }
.santa-note { width: 100%; box-sizing: border-box; min-height: 56px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-size: 15px; }
.santa-or { text-align: center; font-size: 13px; color: var(--muted); }
.santa-or small { margin-left: 6px; }
.santa-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.santa-chip { min-width: 64px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.santa-chip[aria-checked="true"] { border-color: var(--santa-gold); background: rgba(232, 182, 76, .16); color: var(--santa-gold); }
.santa-chip:disabled { opacity: .4; cursor: default; }
.santa-given { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(232, 182, 76, .25); }
.santa-given small { color: var(--muted); font-size: 12px; }
.santa-given q, .santa-q { display: block; font-style: italic; color: var(--santa-cream); font-size: 14px; line-height: 1.4; quotes: "«" "»"; }
html[lang="en"] .santa-given q, html[lang="en"] .santa-q { quotes: "“" "”"; }
.santa-side { margin-top: 4px; }
.santa-boxwrap { display: grid; gap: 10px; justify-items: center; text-align: center; }
.santa-what { margin: 0; font-size: 16px; font-weight: 700; color: var(--santa-cream); }

/* The opening: the lid lifts and turns away, the box glows, the sparks come out; then the contents (santa.js). */
.santa-lid, .santa-glow circle { transform-box: fill-box; transform-origin: 50% 100%; }
.santa-gift.santa-opening .santa-lid { animation: santa-lid 1.1s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.santa-gift.santa-opening .santa-glow circle { animation: santa-glow 1.2s ease-out forwards; }
.santa-gift.santa-opening .santa-sparks { animation: santa-sparks 1.2s ease-out .25s forwards; }
.santa-gift.santa-open .santa-lid { transform: translate(-46px, -40px) rotate(-24deg); }
.santa-gift.santa-open .santa-sparks { opacity: 1; }
.santa-gift.santa-open .santa-glow circle { opacity: 1; }
.santa-opened .santa-from, .santa-opened .santa-what, .santa-opened .santa-q { animation: santa-in .45s ease-out both; }
.santa-opened .santa-what { animation-delay: .12s; } .santa-opened .santa-q { animation-delay: .24s; }
@keyframes santa-lid { 0% { transform: none; } 18% { transform: translateY(4px); } 100% { transform: translate(-46px, -40px) rotate(-24deg); } }
@keyframes santa-glow { from { opacity: 0; } 60% { opacity: 1; } to { opacity: 1; } }
@keyframes santa-sparks { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes santa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .santa-gift.santa-opening .santa-lid, .santa-gift.santa-opening .santa-glow circle, .santa-gift.santa-opening .santa-sparks, .santa-opened .santa-from, .santa-opened .santa-what, .santa-opened .santa-q { animation: none; }
}

/* Gift mode: a bar over the shop says whom the purchase is for */
.santa-gbar { position: fixed; left: 50%; top: calc(8px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 2600; display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100vw - 16px)); padding: 8px 10px 8px 12px; border-radius: 14px; background: #2a1a20; border: 1px solid var(--santa-gold); color: var(--santa-cream); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); font-size: 13px; line-height: 1.35; }
.santa-gbar.hidden { display: none; }
.santa-gbar .santa-hat { width: 28px; height: 22px; }
.santa-gbar span { flex: 1 1 auto; min-width: 0; }
.santa-gcancel { flex: none; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) { .santa-gbar { top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); } }
