/* Advent calendar page (PDP-392, 5.10.15. design). Plain CSS, loaded only on /kalendarz-adwentowy. */

.advent-calendar {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .advent-calendar {
        margin-bottom: 48px;
    }
}

.advent-calendar__desktop,
.advent-calendar__mobile {
    display: none;
}

.advent-calendar__window img,
.advent-calendar__drawer img {
    display: block;
    width: 100%;
    height: 100%;
}

.advent-calendar__open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.advent-calendar__open:focus {
    outline: 3px solid #f3ad24;
    outline-offset: 4px;
}

.advent-calendar__open:focus:not(:focus-visible) {
    outline: none;
}

/* warm pulsing light around today's drawer (follows the drawer shape thanks to the PNG alpha) */
.advent-calendar__open img {
    animation: advent-calendar-glow 2.4s ease-in-out infinite;
}

.advent-calendar__open:hover img {
    filter: brightness(1.06) drop-shadow(0 0 18px rgba(255, 196, 80, 0.95));
    animation: none;
}

@keyframes advent-calendar-glow {
    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(255, 196, 80, 0.45));
    }

    50% {
        filter: drop-shadow(0 0 18px rgba(255, 196, 80, 0.95));
    }
}

@media (prefers-reduced-motion: reduce) {
    .advent-calendar__open img {
        animation: none;
        filter: drop-shadow(0 0 12px rgba(255, 196, 80, 0.85));
    }
}

/* Desktop: 1920 x 3158 px scene scaled to the container, drawers positioned in % */
@media (min-width: 768px) {
    .advent-calendar__desktop {
        display: block;
        max-width: 1200px;
        margin: 0 auto;
    }

    .advent-calendar__building {
        position: relative;
        height: 0;
        margin: 0;
        padding: 0 0 164.4792%;
        list-style: none;
        background: url("img/desktop/background.jpg") center top / 100% auto no-repeat;
    }

    /* drawer boxes include room for the glow and touch each other, only today's drawer takes clicks */
    .advent-calendar__window {
        position: absolute;
        z-index: 1;
        pointer-events: none;
    }

    .advent-calendar__window--active {
        z-index: 2;
    }

    .advent-calendar__window .advent-calendar__open {
        pointer-events: auto;
    }
}

/* Mobile: 375 x 812 px scene, one drawer at a time */
@media (max-width: 767px) {
    .advent-calendar__mobile {
        display: block;
    }

    .advent-calendar__scene {
        position: relative;
        max-width: 480px;
        height: 0;
        margin: 0 auto;
        padding-bottom: 216.5333%;
        background: url("img/mobile/background.jpg") center top / 100% auto no-repeat;
        container-type: inline-size;
    }
}

/* transparent buttons over the arrows drawn in the background */
.advent-calendar__arrow {
    position: absolute;
    top: 27.8325%;
    z-index: 2;
    height: 6.2808%;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.advent-calendar__arrow--prev {
    left: 31.7333%;
    width: 14.4%;
}

.advent-calendar__arrow--next {
    left: 52%;
    width: 14.6667%;
}

.advent-calendar__arrow:focus {
    outline: 3px solid #f3ad24;
    outline-offset: 2px;
}

.advent-calendar__arrow:focus:not(:focus-visible) {
    outline: none;
}

.advent-calendar__arrow[aria-disabled="true"] {
    background: rgba(255, 255, 255, 0.6);
    cursor: default;
}

.advent-calendar__drawer {
    position: absolute;
    top: 37.1921%;
    left: 12.8%;
    width: 74.4%;
    height: 33.6207%;
}

.advent-calendar__drawer-day {
    height: 100%;
}

.advent-calendar__drawer-day[hidden] {
    display: none;
}

/* month and "NN / 24" on the plate under the drawer */
.advent-calendar__plate {
    position: absolute;
    top: 75.6%;
    left: 0;
    width: 100%;
    margin: 0;
    color: #16365c;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    pointer-events: none;
}

.advent-calendar__plate-month {
    display: block;
    font-size: 13px;
    font-size: 3.4667cqw;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.advent-calendar__plate-counter {
    display: block;
    margin-top: 10px;
    margin-top: 2.6667cqw;
    font-size: 16px;
    font-size: 4.2667cqw;
}

/* Prize modal - 5.10.15. popup: cream card, gold frame, navy text.
   The promotion description is the most prominent element. */
.advent-calendar-modal .modal-dialog {
    max-width: 640px;
}

.advent-calendar-modal .modal-content {
    position: relative;
    padding: 48px 48px 32px;
    border: 3px solid #cda254;
    border-radius: 24px;
    background: #fbf9f1;
    box-shadow: inset 0 0 0 6px #fbf9f1, inset 0 0 0 7px #e9d9b4;
    color: #243860;
    text-align: center;
}

.advent-calendar-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid #243860;
    border-radius: 50%;
    background: none;
    color: #243860;
    font-size: 28px;
    line-height: 34px;
    cursor: pointer;
}

.advent-calendar-modal__close:focus,
.advent-calendar-modal__code:focus,
.advent-calendar-modal__link:focus,
.advent-calendar-modal__regulations:focus {
    outline: 3px solid #f3ad24;
    outline-offset: 2px;
}

.advent-calendar-modal__day {
    margin: 0 0 6px;
    color: #243860;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.advent-calendar-modal__headline {
    margin: 0 0 20px;
    color: #c59647;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.advent-calendar-modal__description {
    margin: 0 0 28px;
    color: #243860;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
}

.advent-calendar-modal__description--long {
    font-size: 24px;
    line-height: 1.35;
}

.advent-calendar-modal__code {
    display: inline-block;
    min-width: 260px;
    padding: 10px 24px 8px;
    border: 2px solid #cda254;
    border-radius: 12px;
    background: #243860;
    color: #fff;
    line-height: 1.2;
    cursor: pointer;
}

.advent-calendar-modal__code strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0.06em;
}

.advent-calendar-modal__code-hint {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.8;
}

.advent-calendar-modal__code:hover {
    background: #1b2c4d;
}

.advent-calendar-modal__copied {
    min-height: 20px;
    margin: 6px 0 0;
    font-size: 14px;
}

.advent-calendar-modal__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.advent-calendar-modal__link {
    min-width: 260px;
    padding: 10px 22px;
    border: 2px solid #cda254;
    border-radius: 14px;
    background: #f7f2e5;
    color: #243860;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.advent-calendar-modal__link:hover {
    background: #efe5cc;
    color: #243860;
    text-decoration: none;
}

.advent-calendar-modal__terms {
    margin: 22px 0 8px;
    font-size: 13px;
    line-height: 1.5;
}

.advent-calendar-modal__regulations {
    color: #243860;
    font-size: 13px;
    text-decoration: underline;
}

.advent-calendar-modal__regulations:hover {
    color: #c59647;
}

@media (max-width: 575px) {
    .advent-calendar-modal .modal-content {
        padding: 56px 20px 24px;
    }

    .advent-calendar-modal__day {
        font-size: 22px;
    }

    .advent-calendar-modal__description {
        font-size: 24px;
    }

    .advent-calendar-modal__description--long {
        font-size: 19px;
    }

    .advent-calendar-modal__code,
    .advent-calendar-modal__link {
        width: 100%;
        min-width: 0;
    }
}
