.xwms-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.xwms-overlay.active {
    pointer-events: auto;
}

.xwms-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.xwms-overlay-content {
    position: absolute;
    background: #0c0c0c;
    transition: transform 0.4s ease;
    overflow: auto;
}

/* Dynamic positions */
.xwms-overlay[data-side="left"] .xwms-overlay-content {
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: translateX(-100%);
}
.xwms-overlay[data-side="right"] .xwms-overlay-content {
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    transform: translateX(100%);
}

@media (min-width: 768px) {
    .xwms-overlay[data-side="left"] .xwms-overlay-content {
        max-width: 400px;
    }
    .xwms-overlay[data-side="right"] .xwms-overlay-content {
        max-width: 400px;
    }

    .xwms-overlay[data-side="top"] .xwms-overlay-content {
        /* max-height: 400px; */
    }
    .xwms-overlay[data-side="bottom"] .xwms-overlay-content {
        /* max-height: 400px; */
    }
}
.xwms-overlay[data-side="top"] .xwms-overlay-content {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(-100%);
}
.xwms-overlay[data-side="bottom"] .xwms-overlay-content {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
}

.xwms-overlay.active[data-side="left"] .xwms-overlay-content,
.xwms-overlay.active[data-side="right"] .xwms-overlay-content,
.xwms-overlay.active[data-side="top"] .xwms-overlay-content,
.xwms-overlay.active[data-side="bottom"] .xwms-overlay-content {
    transform: translate(0, 0);
}