.legal-popup {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(90vw, 1400px);
    height: min(90dvh, 1200px);
    max-width: none;
    max-height: none;
    padding: 0;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    overflow: hidden;
}

.legal-popup[open] {
    display: flex;
    flex-direction: column;
}

.legal-popup::backdrop {
    background: rgba(15, 23, 42, .7);
    backdrop-filter: blur(4px);
}

.legal-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.legal-popup__header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
    line-height: 1.35;
}

.legal-popup__close {
    flex: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #0f172a;
    font: inherit;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.legal-popup__close:hover {
    background: #e2e8f0;
}

.legal-popup__close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.legal-popup__frame {
    display: block;
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

html.legal-popup-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .legal-popup {
        border-radius: 10px;
    }

    .legal-popup__header {
        padding: 10px 12px;
    }

    .legal-popup__header h2 {
        font-size: 1rem;
    }
}
