.sop-456-container {
    position: fixed;
    z-index: 99999; /* Increased to ensure it's above Elementor section z-indexes */
    pointer-events: none; /* Let clicks pass through when hidden */
}

.sop-456-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: auto; /* Catch clicks when active */
    z-index: 99998; /* Below panel, above page */
}

.sop-456-overlay.sop-456-active {
    opacity: 1;
    visibility: visible;
}

.sop-456-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Hide off-screen to the right */
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 99999; /* Highest priority */
}

.sop-456-panel.sop-456-active {
    right: 0; /* Slide in */
}

.sop-456-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.sop-456-inner {
    margin-top: 40px;
}

.sop-456-title {
    margin-bottom: 20px;
}

/* Handle admin bar */
body.admin-bar .sop-456-overlay,
body.admin-bar .sop-456-panel {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .sop-456-overlay,
    body.admin-bar .sop-456-panel {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* Prevent body scrolling when active */
body.sop-456-no-scroll {
    overflow: hidden;
}