#hsb-reopen-topbar,
#hsb-reopen-topbar *,
#hsb-reopen-modal-overlay,
#hsb-reopen-modal-overlay * {
    box-sizing: border-box;
}

.hsb-reopen-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 99997;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(37, 49, 76, 0.98) 0%, rgba(52, 66, 88, 0.96) 100%);
    border-bottom: 1px solid rgba(199, 165, 106, 0.42);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    color: #f4eee6;
}

.hsb-reopen-topbar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.hsb-reopen-topbar__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 999px;
    background: #c7a56a;
    box-shadow: 0 0 0 6px rgba(199, 165, 106, 0.12);
}

.hsb-reopen-topbar__text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hsb-reopen-topbar__text strong {
    color: #ffffff;
    font-weight: 700;
}

body.admin-bar .hsb-reopen-topbar {
    top: 32px;
}

.hsb-reopen-modal-overlay[hidden] {
    display: none !important;
}

.hsb-reopen-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 19, 29, 0.64);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 1;
    transition: opacity 0.22s ease;
}

.hsb-reopen-modal-overlay.is-closing {
    opacity: 0;
}

.hsb-reopen-modal {
    position: relative;
    width: min(100%, 640px);
    overflow: hidden;
    border: 1px solid rgba(199, 165, 106, 0.48);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 246, 241, 0.98) 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    transform: translateY(0) scale(1);
    animation: hsb-reopen-pop-in 0.28s ease-out;
}

.hsb-reopen-modal-overlay.is-closing .hsb-reopen-modal {
    transform: translateY(6px) scale(0.985);
    transition: transform 0.22s ease;
}

.hsb-reopen-modal__accent {
    height: 5px;
    background: linear-gradient(90deg, #c7a56a 0%, #e0c08f 50%, #b99262 100%);
}

.hsb-reopen-modal__content {
    padding: 34px 36px 28px;
    text-align: center;
}

.hsb-reopen-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(37, 49, 76, 0.08);
    color: #25314c;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hsb-reopen-modal__close:hover,
.hsb-reopen-modal__close:focus {
    background: #25314c;
    color: #ffffff;
    transform: scale(1.05);
    outline: none;
}

.hsb-reopen-modal__eyebrow {
    margin: 0 0 12px;
    color: #b99262;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hsb-reopen-modal__title {
    margin: 0;
    color: #25314c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 400;
    line-height: 1.08;
}

.hsb-reopen-modal__subtitle {
    margin: 14px 0 12px;
    color: #25314c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.35;
}

.hsb-reopen-modal__message {
    max-width: 530px;
    margin: 0 auto;
    color: #5d5d64;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

.hsb-reopen-modal__countdown {
    margin-top: 24px;
}

.hsb-reopen-modal__progress {
    max-width: 430px;
    height: 6px;
    margin: 0 auto 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(37, 49, 76, 0.10);
}

.hsb-reopen-modal__progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c7a56a 0%, #25314c 100%);
    transition: width 0.1s linear;
}

.hsb-reopen-modal__timer {
    margin: 0;
    color: #6f6d6d;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

html.hsb-reopen-modal-is-active,
body.hsb-reopen-modal-is-active {
    overflow: hidden;
}

@keyframes hsb-reopen-pop-in {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 782px) {
    body.admin-bar .hsb-reopen-topbar {
        top: 46px;
    }
}

@media (max-width: 640px) {
    .hsb-reopen-topbar__inner {
        padding: 11px 14px;
    }

    .hsb-reopen-topbar__text {
        font-size: 11px;
        letter-spacing: 0.1em;
    }

    .hsb-reopen-modal-overlay {
        padding: 18px;
    }

    .hsb-reopen-modal {
        border-radius: 16px;
    }

    .hsb-reopen-modal__content {
        padding: 28px 20px 24px;
    }

    .hsb-reopen-modal__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 28px;
    }

    .hsb-reopen-modal__subtitle {
        font-size: 18px;
    }

    .hsb-reopen-modal__message {
        font-size: 15px;
        line-height: 1.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hsb-reopen-modal,
    .hsb-reopen-modal-overlay,
    .hsb-reopen-modal__close,
    .hsb-reopen-modal__progress-bar {
        animation: none !important;
        transition: none !important;
    }
}
