.ms-cph-overlay,
.ms-cph-overlay * {
    box-sizing: border-box;
}

.ms-cph-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(18px, 3.6vw, 52px);
    background: rgba(2, 18, 43, var(--ms-cph-overlay-opacity, 0.88));
    color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.ms-cph-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ms-cph-overlay[hidden] {
    display: none;
}

body.ms-cph-lock-scroll {
    overflow: hidden;
}

.ms-cph-modal {
    --ms-cph-bg-fallback: linear-gradient(135deg, #05244f 0%, #071936 62%, #050f24 100%);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    align-items: center;
    width: min(1120px, 100%);
    min-height: clamp(520px, 72dvh, 680px);
    padding: clamp(42px, 7vw, 92px);
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: clamp(18px, 2vw, 30px);
    background: #06142e;
    color: #fff;
    outline: none;
}

.ms-cph-modal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(2, 18, 43, 0.96) 0%, rgba(2, 18, 43, 0.86) 42%, rgba(2, 18, 43, 0.58) 100%),
        var(--ms-cph-bg-image, var(--ms-cph-bg-fallback));
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.ms-cph-modal::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 38%),
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 34%);
    pointer-events: none;
}

.ms-cph-content {
    width: min(100%, 650px);
    text-align: left;
}

.ms-cph-kicker {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.74);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ms-cph-modal h2 {
    max-width: 760px;
    margin: 0 0 clamp(14px, 2vw, 20px);
    color: #fff;
    font: inherit;
    font-size: clamp(40px, 6.6vw, 78px);
    font-weight: 760;
    line-height: 0.96;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.ms-cph-message {
    width: min(100%, 580px);
    margin: 0 0 clamp(24px, 3vw, 36px);
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.58;
}

.ms-cph-close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(3, 18, 43, 0.52);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ms-cph-close span,
.ms-cph-close span::before,
.ms-cph-close span::after {
    display: block;
}

.ms-cph-close span {
    position: relative;
    width: 18px;
    height: 18px;
}

.ms-cph-close span::before,
.ms-cph-close span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
}

.ms-cph-close span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ms-cph-close span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.ms-cph-close:focus-visible,
.ms-cph-cta:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

@media (hover: hover) {
    .ms-cph-close:hover {
        background: rgba(255, 255, 255, 0.12);
    }
}

.ms-cph-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 1.2vw, 14px);
    width: min(100%, 610px);
    margin: 0 0 clamp(26px, 3.2vw, 40px);
}

.ms-cph-countdown-item {
    min-width: 0;
    padding: clamp(14px, 2vw, 20px) clamp(8px, 1.2vw, 14px);
    border: 1px solid rgba(255, 255, 255, 0.19);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.075);
    text-align: center;
}

.ms-cph-countdown strong {
    display: block;
    color: #fff;
    font: inherit;
    font-size: clamp(30px, 4.8vw, 58px);
    font-weight: 760;
    line-height: 0.95;
    letter-spacing: -0.055em;
    font-variant-numeric: tabular-nums;
}

.ms-cph-countdown span {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.7);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ms-cph-countdown.is-expired {
    display: none;
}

.ms-cph-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 54px;
    padding: 0 28px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: #fff;
    color: #06142e !important;
    font: inherit;
    font-size: 15px;
    font-weight: 760;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .ms-cph-cta:hover {
        background: rgba(255, 255, 255, 0.9);
        color: #06142e !important;
    }
}

@media (max-width: 860px) {
    .ms-cph-overlay {
        padding: 16px;
    }

    .ms-cph-modal {
        width: 100%;
        min-height: auto;
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        padding: 70px 30px 36px;
        -webkit-overflow-scrolling: touch;
    }

    .ms-cph-modal::before {
        background-image:
            linear-gradient(180deg, rgba(2, 18, 43, 0.96) 0%, rgba(2, 18, 43, 0.88) 54%, rgba(2, 18, 43, 0.76) 100%),
            var(--ms-cph-bg-image, var(--ms-cph-bg-fallback));
        background-position: center;
    }

    .ms-cph-content,
    .ms-cph-message {
        width: 100%;
        text-align: center;
    }

    .ms-cph-kicker,
    .ms-cph-modal h2 {
        margin-inline: auto;
    }

    .ms-cph-modal h2 {
        font-size: clamp(36px, 10vw, 58px);
        letter-spacing: -0.055em;
    }

    .ms-cph-countdown {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .ms-cph-overlay {
        padding: 12px;
    }

    .ms-cph-modal {
        max-height: calc(100dvh - 24px);
        padding: 68px 18px 24px;
        border-radius: 20px;
    }

    .ms-cph-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 44px;
        height: 44px;
    }

    .ms-cph-kicker {
        margin-bottom: 12px;
        font-size: 11px;
    }

    .ms-cph-modal h2 {
        margin-bottom: 14px;
        font-size: clamp(34px, 11.5vw, 50px);
    }

    .ms-cph-message {
        margin-bottom: 22px;
        font-size: 15px;
        line-height: 1.5;
    }

    .ms-cph-countdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 22px;
    }

    .ms-cph-countdown-item {
        border-radius: 14px;
        padding: 15px 8px;
    }

    .ms-cph-countdown strong {
        font-size: clamp(34px, 12.5vw, 48px);
    }

    .ms-cph-countdown span {
        margin-top: 8px;
        font-size: 10px;
    }

    .ms-cph-cta {
        width: 100%;
        min-height: 54px;
    }
}

@media (max-width: 360px) {
    .ms-cph-modal {
        padding-inline: 14px;
    }

    .ms-cph-modal h2 {
        font-size: clamp(31px, 10vw, 40px);
    }

    .ms-cph-countdown strong {
        font-size: 32px;
    }
}

@media (max-height: 590px) and (orientation: landscape) {
    .ms-cph-overlay {
        align-items: start;
        padding: 10px;
    }

    .ms-cph-modal {
        max-height: calc(100dvh - 20px);
        padding: 54px 24px 22px;
    }

    .ms-cph-modal h2 {
        margin-bottom: 10px;
        font-size: clamp(30px, 7vw, 50px);
    }

    .ms-cph-message {
        margin-bottom: 16px;
        font-size: 14px;
    }

    .ms-cph-countdown {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-bottom: 18px;
    }

    .ms-cph-countdown-item {
        padding: 10px 6px;
    }

    .ms-cph-countdown strong {
        font-size: clamp(24px, 7vw, 36px);
    }

    .ms-cph-countdown span {
        margin-top: 6px;
        font-size: 10px;
    }
}

@supports not (height: 100dvh) {
    .ms-cph-overlay {
        min-height: 100vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-cph-overlay {
        transition: none;
    }
}
