/* Legal documents — readable on light theme pages (Divi sidebar + inherited light text). */

.rgpd-document {
    color: var(--opnv-legal-fg, #1e293b);
    max-width: 48rem;
    margin: 0 auto;
    font-size: var(--opnv-legal-fs, 16px) !important;
    line-height: 1.65;
}

.rgpd-document,
.rgpd-document p,
.rgpd-document li,
.rgpd-document label,
.rgpd-document h1,
.rgpd-document h2,
.rgpd-document h3,
.rgpd-document h4,
.rgpd-document strong,
.rgpd-document em {
    color: var(--opnv-legal-fg, #1e293b) !important;
}

body.opnv-legal-page #main-content .rgpd-document,
body.opnv-legal-page #main-content .rgpd-document p,
body.opnv-legal-page #main-content .rgpd-document li,
body.opnv-legal-page #main-content .rgpd-document label,
body.opnv-legal-page #left-area .rgpd-document p,
body.opnv-legal-page #left-area .rgpd-document li,
.opnv-legal-modal-dialog,
.opnv-legal-modal-body .rgpd-document,
.opnv-legal-modal-body .rgpd-document p,
.opnv-legal-modal-body .rgpd-document li,
.opnv-legal-modal-body .rgpd-document label {
    font-size: var(--opnv-legal-fs, 16px) !important;
    line-height: 1.65;
}

.rgpd-document a,
.rgpd-document a:visited {
    color: var(--opnv-legal-link, #1d4ed8) !important;
    text-decoration: underline;
}

.rgpd-document a:hover,
.rgpd-document a:focus {
    filter: brightness(0.85);
}

.rgpd-document h2 {
    font-size: 1.45em;
    margin: 0 0 1rem;
}

.rgpd-document h3 {
    font-size: 1.12em;
    margin: 1.5rem 0 0.6rem;
}

.rgpd-document ul {
    margin: 0.5rem 0 1rem 1.25rem;
}

body.opnv-legal-page #sidebar,
body.opnv-legal-page #main-sidebar,
body.opnv-legal-page .et_pb_widget_area_right,
body.opnv-legal-page .et_pb_widget_area_left,
body.opnv-legal-page #main-content .et_pb_widget,
body.opnv-legal-page aside.widget-area,
body.opnv-legal-page .sidebar,
body.opnv-legal-page #secondary {
    display: none !important;
}

body.opnv-legal-page #left-area,
body.opnv-legal-page #main-content .container,
body.opnv-legal-page .et-l--body,
body.opnv-legal-page .et_pb_post {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
}

body.opnv-legal-page #main-content .container:before {
    display: none !important;
}

html.opnv-legal-modal-open,
body.opnv-legal-modal-open {
    overflow: hidden;
}

.opnv-legal-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.opnv-legal-modal.is-open,
.opnv-legal-modal:not([hidden]) {
    display: flex;
}

.opnv-legal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.opnv-legal-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(86vh, 900px);
    overflow: auto;
    background: #fff;
    color: var(--opnv-legal-fg, #1e293b);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
    padding: 28px 28px 32px;
}

.opnv-legal-modal-title {
    margin: 0 36px 12px 0;
    font-size: 1.35em;
    color: var(--opnv-legal-fg, #1e293b);
}

.opnv-legal-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.opnv-legal-modal-close:hover {
    color: #0f172a;
}

.opnv-legal-modal-body .rgpd-document {
    max-width: none;
    margin: 0;
}

.opnv-legal-modal-body .rgpd-document h1:first-of-type,
.opnv-legal-modal-body .rgpd-document h2:first-of-type {
    display: none;
}

.opnv-prefs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.25rem;
}

.opnv-cookie-prefs .opnv-prefs-toggle,
.opnv-cookie-prefs label:has(.opnv-prefs-analytics),
.opnv-cookie-prefs label:has(.opnv-prefs-social) {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.3;
}

.opnv-cookie-prefs .opnv-prefs-toggle input[type="checkbox"],
.opnv-cookie-prefs .opnv-prefs-analytics,
.opnv-cookie-prefs .opnv-prefs-social {
    appearance: auto;
    -webkit-appearance: checkbox;
    position: static !important;
    float: none !important;
    display: inline-block !important;
    width: 1.1em !important;
    height: 1.1em !important;
    min-width: 1.1em;
    min-height: 1.1em;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    flex: 0 0 auto;
    align-self: center;
}

body.et-fb .opnv-legal-modal,
html.et-fb-preview .opnv-legal-modal,
body.elementor-editor-active .opnv-legal-modal {
    display: none !important;
    pointer-events: none !important;
}
