html.content-popup-open,
body.content-popup-open {
    overflow: hidden;
    overscroll-behavior: none;
}

html.content-popup-open {
    --cc-z-index: 1;
}

.content-popup-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.content-popup-modal[hidden] {
    display: none !important;
}

.content-popup-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 47, 0.72);
}

.content-popup-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(960px, 100%);
    height: min(88vh, 900px);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(10, 25, 47, 0.28);
}

.content-popup-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary-color, #0a192f);
    color: var(--on-primary, #fff);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-popup-modal__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-popup-modal__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.content-popup-modal__fullpage,
.content-popup-modal__close {
    font-family: inherit;
    font-size: 0.8rem;
    line-height: 1;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: inherit;
}

.content-popup-modal__fullpage:hover,
.content-popup-modal__close:hover {
    border-color: var(--secondary-color, #bfa14a);
    color: var(--secondary-color, #bfa14a);
}

.content-popup-modal__close {
    background: var(--secondary-color, #bfa14a);
    border-color: var(--secondary-color, #bfa14a);
    color: var(--primary-color, #0a192f);
    font-weight: 600;
}

.content-popup-modal__close:hover {
    background: var(--secondary-gold-light, #d4c078);
    color: var(--primary-color, #0a192f);
}

.content-popup-modal__iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

body.is-content-popup {
    background: #fff;
}

body.is-content-popup > main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 40px;
    box-sizing: border-box;
}

.content-popup-page-title {
    padding: 28px 0 0;
}

.content-popup-page-title h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
    body.is-content-popup > main {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.is-content-popup .type-page > p,
    body.is-content-popup .type-page > h1,
    body.is-content-popup .type-page > h2,
    body.is-content-popup .type-page > h3,
    body.is-content-popup .type-page > h4,
    body.is-content-popup .type-page > h5,
    body.is-content-popup .type-page > h6,
    body.is-content-popup .type-page > ul,
    body.is-content-popup .type-page > ol,
    body.is-content-popup .type-page > blockquote,
    body.is-content-popup .type-page > figure,
    body.is-content-popup .type-page > .wp-block-group,
    body.is-content-popup .type-page > .wp-block-columns,
    body.is-content-popup .type-page > .wp-block-image,
    body.is-content-popup .type-page > .wp-block-table,
    body.is-content-popup .type-page > .wp-block-list,
    body.is-content-popup .type-page > .wp-block-quote,
    body.is-content-popup .type-page > .wp-block-buttons,
    body.is-content-popup .type-page > [class*="wp-block-acf-block-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .content-popup-modal {
        padding: 0;
    }

    .content-popup-modal__dialog {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .content-popup-modal__title {
        font-size: 0.85rem;
    }
}
