/* Adventskalender (lp_admin → Features). Wird nur eingebunden, wenn der Kalender im Shop sichtbar ist.
   Alles unter .lp-advent*, damit beide Shop-Designs unberührt bleiben. */

.lp-advent-teaser-wrap { margin: .25rem 0 1.25rem; scroll-margin-top: 130px; }

.lp-advent-teaser {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 150px;
    padding: 1.1rem 1.25rem;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    text-align: left;
    color: #fff;
    background-color: #173d2e;
    background-size: cover;
    background-position: right center;
    box-shadow: 0 10px 28px rgba(23, 61, 46, .28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.lp-advent-teaser::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14, 40, 30, .94) 0%, rgba(14, 40, 30, .78) 45%, rgba(14, 40, 30, 0) 80%);
}
.lp-advent-teaser:hover, .lp-advent-teaser:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(23, 61, 46, .36); }
.lp-advent-teaser:focus-visible { outline: 3px solid #e2b04a; outline-offset: 3px; }
.lp-advent-teaser__text, .lp-advent-teaser__cta { position: relative; z-index: 1; }
.lp-advent-teaser__text { display: flex; flex-direction: column; gap: .15rem; max-width: 62%; }
.lp-advent-teaser__kicker { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #f3cf7a; font-weight: 700; }
.lp-advent-teaser__title { font-size: 1.55rem; line-height: 1.15; font-weight: 800; }
.lp-advent-teaser__sub { font-size: .92rem; opacity: .92; }
.lp-advent-teaser__cta {
    flex-shrink: 0;
    align-self: flex-end;
    padding: .55rem 1rem;
    border-radius: 999px;
    background: #e2b04a;
    color: #3b1d0a;
    font-weight: 800;
    font-size: .95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
@media (max-width: 575.98px) {
    .lp-advent-teaser { flex-direction: column; align-items: flex-start; min-height: 170px; background-position: 70% center; }
    .lp-advent-teaser::before { background: linear-gradient(90deg, rgba(14, 40, 30, .94) 0%, rgba(14, 40, 30, .7) 70%, rgba(14, 40, 30, .35) 100%); }
    .lp-advent-teaser__text { max-width: 100%; }
    .lp-advent-teaser__title { font-size: 1.3rem; }
    .lp-advent-teaser__cta { align-self: flex-start; }
}

/* ---------------------------------------------------------------- Overlay */
.lp-advent { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 12px; }
.lp-advent[hidden], .lp-advent__detail[hidden] { display: none !important; }
.lp-advent__backdrop { position: absolute; inset: 0; background: rgba(6, 14, 28, .72); }
body.lp-advent-open { overflow: hidden; }

.lp-advent__panel {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 1.4rem 1.2rem 1.1rem;
    border-radius: 20px;
    background-color: #10203a;
    background-size: cover;
    background-position: center bottom;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
    color: #fff;
}
.lp-advent__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 18, 38, .55) 0%, rgba(8, 18, 38, .25) 55%, rgba(8, 18, 38, .6) 100%);
    border-radius: inherit;
    pointer-events: none;
}
.lp-advent__panel > * { position: relative; }
.lp-advent__title { margin: 0 2.5rem .2rem 0; font-size: 1.7rem; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.lp-advent__intro, .lp-advent__note { margin: 0 0 1rem; color: #fbecd0; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.lp-advent__note { margin: 1rem 0 0; font-size: .85rem; text-align: center; }

.lp-advent__close {
    position: absolute;
    top: .7rem;
    right: .7rem;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #3b1d0a;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.lp-advent__close:focus-visible { outline: 3px solid #e2b04a; outline-offset: 2px; }

/* ---------------------------------------------------------------- Raster + Türchen */
.lp-advent__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (min-width: 768px) { .lp-advent__grid { grid-template-columns: repeat(6, 1fr); gap: 12px; } }

.lp-advent__cell { position: relative; aspect-ratio: 1 / 1; perspective: 900px; }
.lp-advent__door, .lp-advent__behind { position: absolute; inset: 0; border-radius: 12px; }
.lp-advent__door {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    width: 100%;
    padding: 0;
    border: 2px solid rgba(226, 176, 74, .75);
    background: rgba(251, 244, 230, .9);
    color: #8f1d24;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .35), 0 4px 10px rgba(0, 0, 0, .25);
    font: inherit;
}
.lp-advent__num { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 5vw, 2.1rem); font-weight: 700; line-height: 1; }
.lp-advent__hint { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.lp-advent__cell--big .lp-advent__door { border-color: #e2b04a; }
.lp-advent__cell--big .lp-advent__num { color: #b07a12; }

.lp-advent__cell--past .lp-advent__door { background: rgba(70, 80, 95, .55); color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .25); box-shadow: none; }

.lp-advent__cell--today .lp-advent__behind {
    background-color: #fbf4e6;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 3px #e2b04a, 0 6px 18px rgba(0, 0, 0, .35);
}
.lp-advent__cell--today .lp-advent__door {
    z-index: 1;
    cursor: pointer;
    background: linear-gradient(145deg, #c62832 0%, #8f1d24 100%);
    color: #fff;
    border-color: #f3cf7a;
    transform-origin: left center;
    transition: transform .8s cubic-bezier(.3, .7, .2, 1);
    animation: lp-advent-glow 1.8s ease-in-out infinite;
}
.lp-advent__cell--today .lp-advent__hint { color: #f3cf7a; }
.lp-advent__cell--today .lp-advent__door:focus-visible { outline: 3px solid #f3cf7a; outline-offset: 3px; }
.lp-advent__cell--today.is-open .lp-advent__door { transform: rotateY(-108deg); animation: none; }
@keyframes lp-advent-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(243, 207, 122, .7), 0 4px 10px rgba(0, 0, 0, .3); }
    50% { box-shadow: 0 0 0 8px rgba(243, 207, 122, 0), 0 4px 10px rgba(0, 0, 0, .3); }
}

/* ---------------------------------------------------------------- Inhalt des Türchens */
.lp-advent__detail { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(6, 14, 28, .55); }
.lp-advent__card {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 0 0 1.3rem;
    border-radius: 20px;
    background: #fffaf1;
    color: #2b2118;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
    animation: lp-advent-pop .35s ease-out;
}
@keyframes lp-advent-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lp-advent__image { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 42vh; object-fit: cover; border-radius: 20px 20px 0 0; }
.lp-advent__daylabel { margin: .9rem 1.2rem .2rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8f1d24; }
.lp-advent__name { margin: 0 1.2rem .4rem; font-size: 1.35rem; font-weight: 800; color: #2b2118; }
.lp-advent__text { margin: 0 1.2rem .5rem; font-weight: 600; color: #1f4d3a; }
.lp-advent__desc { margin: 0 1.2rem .8rem; font-size: .9rem; color: #6b5d4f; }
.lp-advent__code {
    display: inline-block;
    margin: .2rem 1.2rem .6rem;
    padding: .45rem 1.1rem;
    border: 2px dashed #c62832;
    border-radius: 10px;
    background: #fff;
    font-family: "Courier New", monospace;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8f1d24;
    user-select: all;
}
.lp-advent__btn {
    display: inline-block;
    margin: .3rem 1.2rem 0;
    padding: .7rem 1.6rem;
    border: 0;
    border-radius: 999px;
    background: #c62832;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(198, 40, 50, .35);
}
.lp-advent__btn:hover { background: #a8212a; }
.lp-advent__btn:focus-visible { outline: 3px solid #e2b04a; outline-offset: 3px; }
.lp-advent__btn[disabled] { background: #1f4d3a; cursor: default; box-shadow: none; }
.lp-advent__msg { margin: .8rem 1.2rem 0; font-size: .9rem; min-height: 1.2em; }
.lp-advent__msg.is-ok { color: #1f6b3a; font-weight: 700; }
.lp-advent__msg.is-error { color: #b3202a; font-weight: 700; }
.lp-advent__close--card { background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }

@media (prefers-reduced-motion: reduce) {
    .lp-advent-teaser, .lp-advent__cell--today .lp-advent__door, .lp-advent__card { transition: none; animation: none; }
}
