/*
 * Styling for Complianz-generated legal documents (Privacy Policy, Opt-out
 * preferences, Privacy Statement).
 *
 * These pages render through page-template-default straight into .site-content,
 * which the theme leaves with no padding and no max-width, so the copy ran edge
 * to edge at full viewport width. They also never pick up .mp-container, so none
 * of the site's spacing or type scale applied.
 *
 * Everything is scoped to body.cmplz-document so it cannot leak into real pages.
 * Values come from the theme's own custom properties, with literal fallbacks
 * because this sheet can load before the critical CSS defines them.
 */

/*
 * The theme's style.css carries `.entry-content { padding:0 !important;
 * margin:0 !important }` so full-bleed .mp-section marketing pages can run edge
 * to edge. Legal documents are ordinary prose and need the opposite, so the
 * layout properties below must also be !important to win. Scoped to
 * body.cmplz-document, which only Complianz's own documents carry.
 */
body.cmplz-document .entry-content,
body.cmplz-document .page-header {
    max-width: 820px;          /* ~85 chars: comfortable for long legal prose */
    margin-inline: auto !important;
    padding-inline: 1.5rem !important;
    box-sizing: border-box;
}

body.cmplz-document .entry-content {
    padding-block: 1rem 5rem !important;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--brand-slate-800, #1e293b);
}

body.cmplz-document .entry-title,
body.cmplz-document .entry-content h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--brand-navy-700, #1A2B4B);
    margin-block: 2.5rem 0.5rem;
}

body.cmplz-document .entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--brand-navy-700, #1A2B4B);
    margin-block: 3rem 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

body.cmplz-document .entry-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--brand-navy-700, #1A2B4B);
    margin-block: 2rem 0.5rem;
}

body.cmplz-document .entry-content p,
body.cmplz-document .entry-content li { margin-block: 0 0.85rem; }
body.cmplz-document .entry-content ul,
body.cmplz-document .entry-content ol { padding-left: 1.35rem; margin-block: 0 1.25rem; }

body.cmplz-document .entry-content a {
    color: var(--brand-raspberry-500, #C1188B);
    text-decoration: underline;
    text-underline-offset: 2px;
}
body.cmplz-document .entry-content a:hover { color: var(--brand-raspberry-600, #a8157a); }

/* Cookie tables can be wider than the column; let them scroll rather than
   forcing the whole page to scroll sideways. */
body.cmplz-document .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-block: 0 1.5rem;
    font-size: 0.9375rem;
    display: block;
    overflow-x: auto;
}
body.cmplz-document .entry-content th,
body.cmplz-document .entry-content td {
    border: 1px solid #e2e8f0;
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
body.cmplz-document .entry-content th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--brand-navy-700, #1A2B4B);
}

/* Data-request / opt-out form */
body.cmplz-document .entry-content form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.75rem;
    margin-block: 1.5rem 2rem;
}
body.cmplz-document .entry-content label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
body.cmplz-document .entry-content input[type="text"],
body.cmplz-document .entry-content input[type="email"],
body.cmplz-document .entry-content select,
body.cmplz-document .entry-content textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
body.cmplz-document .entry-content input:focus-visible,
body.cmplz-document .entry-content select:focus-visible,
body.cmplz-document .entry-content textarea:focus-visible {
    outline: 2px solid var(--brand-raspberry-500, #C1188B);
    outline-offset: 1px;
}
body.cmplz-document .entry-content input[type="checkbox"],
body.cmplz-document .entry-content input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: var(--brand-raspberry-500, #C1188B);
}
body.cmplz-document .entry-content input[type="submit"],
body.cmplz-document .entry-content button[type="submit"] {
    width: auto;
    background: var(--brand-raspberry-500, #C1188B);
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 0.8rem 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    margin-bottom: 0;
}
body.cmplz-document .entry-content input[type="submit"]:hover,
body.cmplz-document .entry-content button[type="submit"]:hover {
    background: var(--brand-raspberry-600, #a8157a);
}

@media (max-width: 600px) {
    body.cmplz-document .entry-content { padding-block: 0.5rem 3rem; }
    body.cmplz-document .entry-content h2 { margin-top: 2.25rem; }
    body.cmplz-document .entry-content form { padding: 1.25rem; }
}
