.hustar-promotion-popup[hidden] {
    display: none;
}

.hustar-promotion-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.hustar-promotion-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hustar-promotion-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hustar-promotion-popup.is-open .hustar-promotion-popup__backdrop,
.hustar-promotion-popup.is-open .hustar-promotion-popup__dialog {
    opacity: 1;
}

.hustar-promotion-popup.is-open .hustar-promotion-popup__dialog {
    transform: translateY(0) scale(1);
}

.hustar-promotion-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: #111 !important;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
    color: #fff !important;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hustar-promotion-popup__close::before,
.hustar-promotion-popup__close::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: '';
    transform-origin: center;
}

.hustar-promotion-popup__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.hustar-promotion-popup__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.hustar-promotion-popup__close:focus {
    outline: none;
}

.hustar-promotion-popup__image-link {
    display: block;
    line-height: 0;
}

.hustar-promotion-popup__image {
    display: block;
    width: 100%;
    height: auto;
}

.hustar-promotion-popup__countdown {
    position: relative;
    padding: 22px 26px 26px;
    border-top: 1px solid #f2dfc1;
    background: #fff;
    color: #111;
    text-align: center;
}

.hustar-promotion-popup__countdown .flipdown {
    margin: 0 auto;
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar {
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-group-heading::before {
    color: #111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-group:nth-child(n+2):nth-child(-n+3)::before,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-group:nth-child(n+2):nth-child(-n+3)::after {
    background-color: #f7981d;
    box-shadow: 0 1px 5px rgba(247, 152, 29, 0.35);
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor {
    border: 1px solid #df8108;
    border-radius: 7px;
    background-color: #f7981d;
    box-shadow: 0 8px 18px rgba(247, 152, 29, 0.28);
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-top,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-bottom,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-leaf-front,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-leaf-rear {
    background-color: #f7981d;
    color: #fff;
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-leaf-front,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-top {
    border-radius: 6px 6px 0 0;
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-leaf-rear,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-bottom,
.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor::after {
    border-radius: 0 0 6px 6px;
}

.hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor::after {
    border-top: 1px solid #d97c06;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
}

body.hustar-promotion-popup-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .hustar-promotion-popup {
        padding: 14px;
    }

    .hustar-promotion-popup__dialog {
        max-height: calc(100vh - 28px);
        border-radius: 9px;
    }

    .hustar-promotion-popup__close {
        top: 7px;
        right: 7px;
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        font-size: 24px !important;
    }

    .hustar-promotion-popup__countdown {
        padding: 16px 10px 14px;
    }

    .hustar-promotion-popup__countdown .flipdown.flipdown__theme-hustar .rotor-group-heading::before {
        font-size: 8px;
        letter-spacing: 0.06em;
    }

}

@media (max-width: 360px) {
    .hustar-promotion-popup__countdown .flipdown {
        margin-bottom: -12px;
        transform: scale(0.82);
        transform-origin: top center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hustar-promotion-popup__backdrop,
    .hustar-promotion-popup__dialog,
    .hustar-promotion-popup__countdown .flipdown .rotor-leaf {
        transition: none;
    }
}
