/* Modal Overlay */
.waverse-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--w-modal-backdrop, rgba(0, 0, 0, 0.7));
    z-index: 99999;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* opacity: 0; Handled by JS fade */
}

/* Modal Container */
.waverse-modal-container {
    background: var(--w-modal-bg, #fff);
    width: 100%;
    max-width: var(--w-modal-width, 900px);
    max-height: var(--w-modal-height, 90vh);
    min-height: var(--w-modal-min-height, auto);
    padding: var(--w-container-padding, 0);
    /* Outer padding if needed */
    overflow-y: auto;
    border-radius: var(--w-modal-radius, 8px);
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Close Button */
.waverse-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    color: var(--w-modal-close-color, #333);
    transition: color 0.3s;
}

.waverse-modal-close:hover {
    color: var(--w-modal-close-hover, #000);
}

/* Modal Content */
.waverse-modal-content {
    padding: var(--w-modal-padding, 20px);
}

/* Loader */
.waverse-modal-loader {
    padding: 40px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

/* Responsive */
@media (max-width: 767px) {
    .waverse-modal-container {
        max-height: 95vh;
        width: 95%;
    }
}