/* ==========================================================
   Popup Wrapper — frontend overlay modal
   ========================================================== */

.wc-popup {
    display: contents; /* transparent wrapper; does not affect page layout */
}

/* Overlay backdrop */
.wc-popup__overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--wc-popup-overlay-bg, rgba(0, 0, 0, 0.62));
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.wc-popup__overlay[hidden] {
    display: none;
}

/* Dialog box */
.wc-popup__dialog {
    position: relative;
    width: min(var(--wc-popup-dialog-max-width, 700px), 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.33);
}

/* Close button */
.wc-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #f2f2f2;
    color: #333;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wc-popup__close:hover {
    background: #e0e0e0;
}

.wc-popup__body {
    overflow: hidden;
}

/* Prevent body scroll while popup is open */
body.wc-popup-open {
    overflow: hidden;
}

/* ==========================================================
   Editor preview shell
   ========================================================== */

.wc-popup--editor > .wc-popup__editor-shell {
    border: 2px dashed #c3c4c7;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.wc-popup__editor-header {
    background: #1e1e1e;
    color: #eee;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    user-select: none;
}

.wc-popup__editor-label {
    opacity: 0.7;
    font-style: italic;
}

.wc-popup__editor-close-demo {
    font-size: 20px;
    opacity: 0.4;
    cursor: default;
}

.wc-popup__editor-body {
    padding: 16px;
}

@media (max-width: 420px) {
    .wc-popup__overlay {
        padding: 8px;
    }
}
