/* ============================================================
   Modal – fullscreen overlay (generic, reusable)
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: transparent;
    display: flex;
    flex-direction: column;
}

.modal.hidden {
    display: none;
}

/* ── Scroll lock ─────────────────────────────────────────── */

html.modal-open,
body.modal-open {
    overflow: hidden;
}

/* ── Inner card ───────────────────────────────────────────── */

.modal__body {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: var(--spacing-m);
    padding: var(--spacing-m);
    background: #fff;
    border-radius: var(--radius-m);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.10);
}

/* ── Close button ─────────────────────────────────────────── */

.modal__close {
    position: absolute;
    top: var(--spacing-s);
    right: var(--spacing-s);
    z-index: 1;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: #000;
    font-size: 1.375rem;
    line-height: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
    background: rgba(0, 0, 0, 0.16);
    outline: none;
}

/* ── iframe ───────────────────────────────────────────────── */

.modal__frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    flex: 1;
}

/* ── Desktop: centred card, fixed width ───────────────────── */

@media (min-width: 760px) {
    .modal {
        align-items: center;
        justify-content: center;
    }

    .modal__body {
        flex: none;
        width: 760px;
        max-width: calc(100% - 2 * var(--spacing-m));
        height: 80vh;
    }
}
