.emup-popup {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(calc(100% - 32px), 500px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: auto;
    background: var(--emup-popup-bg, #fff);
    color: var(--emup-popup-text, #112b4e);
    box-shadow: 0 24px 80px #09183166;
}

.emup-popup::backdrop {
    background: #061328b8;
}

.emup-popup:not([open]) {
    display: none;
}

body:has(.emup-popup[open]) {
    overflow: hidden;
}

.emup-popup .emup-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cbd7e5;
    border-radius: 50%;
    background: #fff;
    color: #112b4e;
    font: 24px/1 sans-serif;
    cursor: pointer;
}

.emup-popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    background: #091831;
}

.emup-popup-content {
    padding: clamp(24px, 5vw, 36px);
}

.emup-popup:not(:has(.emup-popup-image)) .emup-popup-content {
    padding-top: 62px;
}

.emup-popup h2 {
    margin: 0;
    color: var(--emup-popup-text, #112b4e);
    font-size: clamp(24px, 6vw, 34px);
    line-height: 1.1;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}

.emup-popup p {
    margin: 12px 0 0;
    color: var(--emup-popup-text, #374d69);
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.emup-popup .emup-popup-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 20px;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--emup-popup-button, #075bbf);
    color: var(--emup-popup-button-text, #fff);
    font-weight: 700;
    text-decoration: none;
}

.emup-popup .emup-popup-link:hover {
    filter: brightness(.93);
}

.emup-popup-image-only { max-height: 80dvh; object-fit: contain; }
.emup-popup-continue { display: block; padding: 10px 24px 20px; color: var(--emup-popup-text, #112b4e); font-size: 14px; text-align: center; }
.emup-popup [hidden] { display: none !important; }
.emup-popup .screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; position: absolute !important; white-space: nowrap; }

.emup-popup :is(button, a):focus-visible {
    outline: 3px solid #e9a640;
    outline-offset: 2px;
}
