.open-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    background: rgba(0, 0, 0, .68);
    overflow-y: auto;
}

.open-popup-overlay.is-visible {
    display: flex;
}

body.open-popup-lock {
    overflow: hidden;
}

.open-popup-card {
    position: relative;
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    border: 4px solid #5a3d19;
    border-radius: 8px;
    background: #4a2b00;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
    scrollbar-width: thin;
}

.open-popup-inner {
    margin: 4px;
    padding: 16px 16px 13px;
    border: 2px dashed #ff7800;
    border-radius: 4px;
    background: linear-gradient(180deg, #4d2e00 0%, #302006 100%);
    color: #fff;
    text-align: center;
}

.open-popup-close {
    position: absolute;
    top: -11px;
    right: -11px;
    z-index: 3;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #0698df !important;
    color: #fff !important;
    font-size: 28px;
    font-weight: 400;
    line-height: 31px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}

.open-popup-logo {
    display: block;
    width: auto;
    max-width: 135px;
    max-height: 64px;
    margin: 0 auto 13px;
    object-fit: contain;
}

.open-popup-countdown-box,
.open-popup-gift-box {
    border: 1px dashed #1892bf;
    border-radius: 7px;
    background: rgba(28, 24, 12, .38);
}

.open-popup-countdown-box {
    padding: 12px 12px 11px;
}

.open-popup-title {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.open-popup-open-time {
    margin-top: 2px;
    color: #6db9ea;
    font-size: 11px;
    font-weight: 500;
}

.open-popup-time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 9px;
}

.open-popup-time-cell {
    min-width: 0;
    padding: 8px 3px 7px;
    border-radius: 7px;
    background: #078bcf;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}

.open-popup-time-cell strong {
    display: block;
    min-height: 23px;
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.15;
}

.open-popup-time-cell span {
    display: block;
    margin-top: 2px;
    color: #dff4ff;
    font-size: 9px;
    font-weight: 700;
}

.open-popup-gift-box {
    margin-top: 12px;
    padding: 11px 10px 9px;
    border-style: solid;
    border-color: #927d55;
    background: #4b4020;
}

.open-popup-gift-title {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.open-popup-gift-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin-top: 9px;
}

.open-popup-giftcode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 93px;
    min-height: 34px;
    padding: 6px 11px;
    border: 3px solid #9b917c !important;
    border-radius: 18px !important;
    background: #3b280d !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: none !important;
}

.open-popup-giftcode:hover,
.open-popup-giftcode:focus {
    border-color: #d4b465 !important;
    transform: translateY(-1px);
}

.open-popup-giftcode.is-copied {
    border-color: #69d589 !important;
    background: #234b2c !important;
}

.open-popup-giftcode small {
    opacity: .72;
    font-size: 12px;
}

.open-popup-gift-empty {
    margin-top: 9px;
    padding: 8px 10px;
    color: #ffe8a6;
    font-size: 11px;
    font-style: italic;
}

.open-popup-copy-hint {
    min-height: 16px;
    margin-top: 7px;
    color: #39aaff;
    font-size: 10px;
    font-style: italic;
}

.open-popup-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.open-popup-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 8px;
    border-radius: 6px;
    background: #2f7bed !important;
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none !important;
}

.open-popup-link-wide {
    grid-column: 1 / -1;
    background: #087cbd !important;
    font-size: 13px;
}

.open-popup-link:hover,
.open-popup-link:focus {
    filter: brightness(1.08);
    color: #fff !important;
}

.open-popup-hide-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 11px auto 0;
    color: #258dd1;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.open-popup-hide-row input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #128ed3;
    cursor: pointer;
}

@media (max-width: 420px) {
    .open-popup-inner {
        padding: 14px 11px 11px;
    }

    .open-popup-time-grid {
        gap: 6px;
    }

    .open-popup-time-cell strong {
        font-size: 17px;
    }

    .open-popup-links {
        grid-template-columns: 1fr;
    }

    .open-popup-link-wide {
        grid-column: auto;
    }
}
