/**
 * Legal Modals — Modal styling for Impressum, Datenschutz, AGB, AVV
 *
 * Loaded on singular 'lap' posts via enqueue-legal-modals.php
 */
.legal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(10,57,78,0.55); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s;
}
.legal-backdrop.visible { opacity: 1; }

.legal-modal {
    background: #fff; width: 92%; max-width: 720px; max-height: 85vh;
    border-radius: 12px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 8px 24px rgba(10,57,78,0.14), 0 4px 8px rgba(10,57,78,0.09);
    transform: scale(0.95) translateY(12px);
    transition: transform .3s cubic-bezier(0.25,0.46,0.45,0.94);
}
.legal-backdrop.visible .legal-modal { transform: scale(1) translateY(0); }

.legal-modal-head {
    position: sticky; top: 0; z-index: 1; background: #fff;
    padding: 20px 24px; border-bottom: 1px solid #D3DDE1;
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.legal-modal-head h2 { font-size: 18px; font-weight: 700; color: #0A394E; margin: 0; }

.legal-modal-close {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: #F0F4F5; color: #0A394E; font-size: 20px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.legal-modal-close:hover { background: #D3DDE1; }

.legal-modal-body {
    padding: 24px; overflow-y: auto; flex: 1;
    font-size: 14px; line-height: 1.8; color: #0A394E;
}
.legal-modal-body h2 { font-size: 17px; font-weight: 700; margin: 28px 0 12px; }
.legal-modal-body h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
.legal-modal-body p { margin: 0 0 12px; }
.legal-modal-body ul, .legal-modal-body ol { padding-left: 24px; margin: 0 0 12px; }
.legal-modal-body li { margin-bottom: 6px; }
.legal-modal-body a { color: #ea580c; text-decoration: underline; }

.legal-modal-body .legal-lang { display: none; }
.legal-modal-body .legal-lang.active { display: block; }

.legal-placeholder { text-align: center; padding: 48px 24px; color: #5A6F78; }

/* Responsive: fullscreen on mobile */
@media (max-width: 768px) {
    .legal-modal {
        width: 100%; max-width: 100%; max-height: 100vh;
        height: 100vh; border-radius: 0;
    }
    .legal-modal-body { padding: 16px; }
}
