/* =============================================================================
   WAVES MODAL — shared modal system
   ========================================================================== */

/* ── Body scroll lock ─────────────────────────────────────────────────────── */

body.waves-modal-open {
    overflow: hidden;
}

/* ── Shared backdrop ──────────────────────────────────────────────────────── */

#waves-modal-backdrop {
    background: var(--overlay-modal);
    display: none;
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 1000;
}

#waves-modal-backdrop.open {
    display: block;
}

/* ── Base modal panel ─────────────────────────────────────────────────────── */

.waves-modal {
    background: var(--surface-card);
    background-clip: padding-box;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    left: 50%;
    overflow: hidden;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.waves-modal.open {
    display: flex;
}

/* ── Standard close button ────────────────────────────────────────────────── */

.waves-modal__close {
    align-items: center;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-heading);
    cursor: pointer;
    display: inline-flex;
    align-self: flex-end;
    font-size: 28px;
    height: 40px;
    justify-content: center;
    line-height: 1;
    position: sticky;
    top: 0;
    width: 40px;
    z-index: 2;
}

.waves-modal__close:hover,
.waves-modal__close:focus-visible {
    background: var(--surface-hover);
    border-color: var(--color-gray-400);
}
