html.hl-leaving-notice-open,
html.hl-leaving-notice-open body {
    overflow: hidden;
}

.hl-leaving-notice {
    display: none;
}

.hl-leaving-notice.is-active {
    display: block;
}

.hl-leaving-notice__overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(0, 0, 0, 0.55);
}

.hl-leaving-notice__dialog {
    position: fixed;
    z-index: 999999;
    top: 50%;
    left: 50%;
    width: min(92vw, 620px);
    max-height: 88vh;
    overflow: auto;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: clamp(24px, 4vw, 42px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    outline: none;
}

.hl-leaving-notice__x {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    padding: 4px 8px;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.hl-leaving-notice__content > :first-child {
    margin-top: 0;
}

.hl-leaving-notice__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding-top: 8px;
}

.hl-leaving-notice__continue {
    display: inline-block;
}

.hl-leaving-notice__stay {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 600px) {
    .hl-leaving-notice__dialog {
        width: calc(100vw - 32px);
        padding: 28px 22px;
    }

    .hl-leaving-notice__actions {
        display: block;
    }

    .hl-leaving-notice__actions > * {
        display: inline-block;
        margin: 6px 0;
    }
}
