/* Weihnachtszeit auf der Kundenseite (1. bis 26. Dezember).
   Wird nur geladen, solange layout/kunde.html.twig die Zeit für gekommen
   hält — danach verschwindet alles von selbst. Logik in weihnacht.js.
   Bei „Bewegung reduzieren“ steht alles still; sichtbar bleibt es trotzdem. */

:root {
    --wn-gruen: #1f7a4f;
    --wn-gold: #f2b93b;
    --wn-warm: #ffd36b;
}

/* ---------- Lichterkette an der Kopfleiste ---------- */

.lichterkette {
    position: absolute; left: 0; right: 0; bottom: -15px; height: 24px;
    pointer-events: none; overflow: hidden;
    transition: transform .3s ease;
}
/* Beim Scrollen hängt die Kette über dem Inhalt (am Handy verdeckte sie
   Wandmotive) — dann zieht sie sich an die Kante der Kopfleiste hoch. */
.lichterkette.eng { transform: translateY(-8px); }
.lichterkette.eng .birne { transform: rotate(var(--neig, 0deg)) scale(.72); }
.birne { transition: transform .3s ease; }
/* Knöpfe der Kopfleiste liegen immer über Draht und Birnen. */
.kopf__innen { position: relative; z-index: 1; }
.lichterkette__draht { position: absolute; inset: 0 0 auto 0; width: 100%; height: 16px; }
.lichterkette__draht path { fill: none; stroke: #59606b; stroke-width: 1.3; }
.birne {
    position: absolute; top: 5px; width: 9px; height: 15px; margin-left: -4.5px;
    pointer-events: auto; cursor: pointer; transform-origin: 50% 0;
    transform: rotate(var(--neig, 0deg));
}
.birne::before { /* Fassung */
    content: ""; position: absolute; left: 1.5px; top: 0; width: 6px; height: 4px;
    background: #4a5058; border-radius: 1px;
}
.birne::after { /* Glas */
    content: ""; position: absolute; left: 0; top: 3px; width: 9px; height: 12px;
    border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
    background: var(--farbe); box-shadow: 0 0 7px 2px var(--schein);
    animation: birne-funkeln var(--takt, 2.6s) ease-in-out var(--verz, 0s) infinite alternate;
    transition: background-color .25s ease, box-shadow .25s ease;
}
.birne:hover { animation: birne-wackeln .5s ease-in-out; }
.birne.aus::after { background: #c9ced6; box-shadow: none; animation: none; opacity: .8; }
.birne--rot { --farbe: #e8173f; --schein: rgba(232, 23, 63, .55); }
.birne--gruen { --farbe: #22a05f; --schein: rgba(34, 160, 95, .5); }
.birne--gold { --farbe: var(--wn-warm); --schein: rgba(255, 196, 64, .65); }
.birne--weiss { --farbe: #fff4d6; --schein: rgba(255, 236, 180, .7); }

@keyframes birne-funkeln {
    from { opacity: 1; }
    to { opacity: .55; box-shadow: 0 0 3px 0 var(--schein); }
}
@keyframes birne-wackeln {
    0%, 100% { transform: rotate(var(--neig, 0deg)); }
    30% { transform: rotate(calc(var(--neig, 0deg) + 14deg)); }
    65% { transform: rotate(calc(var(--neig, 0deg) - 9deg)); }
}
/* Alle aus: kurz dunkel, dann geht die Kette als Welle wieder an. */
.lichterkette.welle .birne::after { animation: birne-welle .5s ease-out var(--welle, 0s) both; }
@keyframes birne-welle {
    from { background: #c9ced6; box-shadow: none; transform: scale(.7); }
    60% { transform: scale(1.35); }
    to { transform: scale(1); }
}

/* ---------- Adventskranz im Einstieg ---------- */

.advent {
    display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px;
    padding: 6px 14px 6px 10px; border-radius: 999px;
    background: #f1f8f4; border: 1px solid #cfe7da; color: #145a39;
    font-size: 14px; font-weight: 600; line-height: 1.3;
}
.advent__kranz { display: inline-flex; align-items: flex-end; gap: 4px; height: 24px; padding: 0 2px; position: relative; }
.advent__kranz::after { /* Tannengrün unter den Kerzen */
    content: ""; position: absolute; left: -3px; right: -3px; bottom: -2px; height: 6px;
    border-radius: 6px; background: radial-gradient(circle at 20% 50%, var(--wn-gruen) 40%, transparent 42%) 0 0 / 7px 6px, #2b8a5b;
}
.kerze { position: relative; display: block; width: 6px; height: 13px; border-radius: 1px 1px 0 0; background: var(--rot); }
.kerze::before { /* Docht */
    content: ""; position: absolute; left: 2.5px; top: -3px; width: 1px; height: 3px; background: #333;
}
.kerze.an::after { /* Flamme */
    content: ""; position: absolute; left: 0; top: -12px; width: 6px; height: 10px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: radial-gradient(ellipse at 50% 70%, #fff6c4 0 25%, var(--wn-warm) 45%, #ff9a2e 80%);
    box-shadow: 0 0 8px 2px rgba(255, 190, 70, .55);
    transform-origin: 50% 100%; animation: flamme 1.3s ease-in-out infinite alternate;
}
.kerze:nth-child(2).an::after { animation-delay: -.4s; }
.kerze:nth-child(3).an::after { animation-delay: -.9s; }
.kerze:nth-child(4).an::after { animation-delay: -.2s; }
@keyframes flamme {
    0% { transform: scale(1, 1) rotate(-2deg); }
    50% { transform: scale(.92, 1.08) rotate(2deg); }
    100% { transform: scale(1.04, .94) rotate(-1deg); }
}

/* ---------- Schnee und Gruß im Einstiegsbild ---------- */

.schnee { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.festgruss {
    position: absolute; overflow: hidden; z-index: 1; pointer-events: none;
    box-shadow: 0 0 22px rgba(242, 185, 59, .6);
}
.festgruss canvas { display: block; width: 100%; height: 100%; }

.festhinweis {
    position: fixed; z-index: 40; left: 50%; top: 92px; transform: translateX(-50%);
    max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
    background: #0f4d34; color: #fff; font-weight: 600; text-align: center;
    box-shadow: var(--schatten-schwebend);
}

/* ---------- Schlitten über der Standortkarte ---------- */

.schlitten {
    position: absolute; left: 0; top: 0; z-index: 2; width: 92px; height: 34px;
    cursor: pointer; opacity: 0; will-change: transform;
    filter: drop-shadow(0 2px 2px rgba(16, 24, 40, .25));
}
.schlitten svg { display: block; width: 100%; height: 100%; overflow: visible; }
.geschenk { position: absolute; left: 0; top: 0; z-index: 2; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; }
.funke {
    position: absolute; z-index: 2; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
    background: var(--wn-gold); pointer-events: none; box-shadow: 0 0 6px var(--wn-gold);
}

/* ---------- Weihnachtsgruß in der Motivprobe ---------- */

.gruss { margin-top: 24px; padding: 20px; background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); }
.gruss__titel { color: var(--tinte); font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.gruss__titel span { color: var(--wn-gruen); }
.gruss__vorlagen { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.gruss__vorlagen .knopf { gap: 8px; }
.gruss__muster { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .12); }
.gruss__felder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gruss__felder input { width: 100%; }
.gruss__aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.gruss__aktionen .knopf { flex: 1 1 auto; }
.gruss .klein { margin-top: 10px; }
.bildschirm canvas.wandmotiv { padding: 0; }
@media (max-width: 560px) {
    .gruss__felder { grid-template-columns: 1fr; }
}

/* ---------- Ruhe, wer es ruhig möchte ---------- */

@media (prefers-reduced-motion: reduce) {
    .birne::after, .kerze.an::after { animation: none; }
    .birne:hover { animation: none; }
    .lichterkette.welle .birne::after { animation: none; }
}

/* Aufgeklapptes Handymenü nicht mit Birnen überdecken. */
.kopf:has(.kopf__nav.is-open) .lichterkette { display: none; }
