/* ═════════════════════════════════════════════════════════════════
   NDMU Consent Banner — Complianz Custom Styling
   Added 2026-10-06, extracted to its own file 2026-10-26 so it can
   be enqueued conditionally (prod only). On staging the Complianz
   banner falls back to its unstyled default for A/B comparison.
   Design: Editorial Calm — pale yellow stock, Tiempos serif title,
   gold-first Accept, lowercase, hairline gold rule, measured motion
   ═════════════════════════════════════════════════════════════════ */

/* ── Container ───────────────────────────────────────────────────── */
.cmplz-cookiebanner {
    background: #FFF8EC !important;
    border: 0 !important;
    border-top: 3px solid #f4b223 !important;
    border-radius: 0 !important;
    padding: 1.75rem 2rem !important;
    box-shadow: 0 18px 48px -24px rgba(13,59,97,.35),
                0 2px 6px rgba(13,59,97,.08) !important;
    max-width: 660px;
    font-family: 'Avenir LT Std', Arial, sans-serif;
    color: #1a1a1a;
}

/* ── Layout stability (prevent Complianz JS layout flicker) ──────── */
/* IMPORTANT: scope display rules to .cmplz-show so Complianz can still
   dismiss the banner by removing that class after Accept/Deny. */
body .cmplz-cookiebanner.cmplz-show .cmplz-body {
    display: block !important;
}
body .cmplz-cookiebanner.cmplz-show .cmplz-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}
body .cmplz-cookiebanner.cmplz-show .cmplz-header .cmplz-title {
    flex: 1 1 auto !important;
}

/* ── Typography ──────────────────────────────────────────────────── */
.cmplz-cookiebanner .cmplz-title {
    font-family: 'Tiempos', Georgia, serif !important;
    font-size: 1.35rem !important;
    font-weight: 500 !important;
    color: #0D3B61 !important;
    text-transform: lowercase !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    margin: 0 0 0.5rem !important;
}
.cmplz-cookiebanner .cmplz-message {
    font-family: 'Avenir LT Std', Arial, sans-serif !important;
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    color: #333 !important;
    margin-bottom: 1.25rem !important;
}

/* ── Inline links: underline reveals on hover ────────────────────── */
.cmplz-cookiebanner .cmplz-message a,
.cmplz-cookiebanner .cmplz-documents a {
    color: #056cb5 !important;
    text-decoration: none !important;
    background: linear-gradient(#056cb5,#056cb5) 0 100%/0 1px no-repeat;
    padding-bottom: 1px;
    transition: background-size 220ms cubic-bezier(0.33, 1, 0.68, 1);
}
.cmplz-cookiebanner .cmplz-message a:hover,
.cmplz-cookiebanner .cmplz-documents a:hover {
    background-size: 100% 1px;
}

/* ── Button row ──────────────────────────────────────────────────── */
body .cmplz-cookiebanner .cmplz-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 1rem 0 !important;
}

/* ── Base button styles — aesthetics only, NO display rule ──────── */
body .cmplz-cookiebanner .cmplz-btn,
body .cmplz-cookiebanner button.cmplz-btn,
body .cmplz-cookiebanner a.cmplz-btn {
    font-family: 'Avenir LT Std', Arial, sans-serif !important;
    font-weight: 700 !important;
    text-transform: lowercase !important;
    letter-spacing: 0.01em !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 2px rgba(13,59,97,.08) !important;
    transition: transform 180ms cubic-bezier(0.33, 1, 0.68, 1),
                background 180ms ease, color 180ms ease,
                border-color 180ms ease, box-shadow 180ms ease !important;
}
body .cmplz-cookiebanner .cmplz-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,59,97,.18) !important;
}
body .cmplz-cookiebanner .cmplz-btn:active { transform: translateY(0); }

/* ── Three main CTAs: size + color only (NO display forcing) ────── */
body .cmplz-cookiebanner .cmplz-accept,
body .cmplz-cookiebanner .cmplz-deny,
body .cmplz-cookiebanner .cmplz-save-preferences {
    width: 100% !important;
    max-width: 320px !important;
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 1.5rem !important;
    font-size: 0.9rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex: 0 0 auto !important;
    align-self: center !important;
}

/* ── Hide Impressum + any empty/placeholder links ───────────────── */
body .cmplz-cookiebanner a.impressum,
body .cmplz-cookiebanner .cmplz-documents li:has(a.impressum),
body .cmplz-cookiebanner .cmplz-documents a:empty,
body .cmplz-cookiebanner .cmplz-documents li:has(a:empty) {
    display: none !important;
}

body .cmplz-cookiebanner .cmplz-accept {
    background: #f4b223 !important;
    color: #1a1a1a !important;
    border: 1.5px solid #f4b223 !important;
}
body .cmplz-cookiebanner .cmplz-accept:hover {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

body .cmplz-cookiebanner .cmplz-deny {
    background: #ffffff !important;
    color: #0D3B61 !important;
    border: 2px solid #0D3B61 !important;
}
body .cmplz-cookiebanner .cmplz-deny:hover {
    background: #0D3B61 !important;
    color: #ffffff !important;
}

body .cmplz-cookiebanner .cmplz-save-preferences {
    background: #0D3B61 !important;
    color: #ffffff !important;
    border: 1.5px solid #0D3B61 !important;
}
body .cmplz-cookiebanner .cmplz-save-preferences:hover {
    background: #ffffff !important;
    color: #0D3B61 !important;
}

/* ── Clean up redundant / stale CTAs ─────────────────────────────── */
body .cmplz-cookiebanner .tcf,
body .cmplz-cookiebanner a.cmplz-manage-vendors,
body .cmplz-cookiebanner .cmplz-buttons a.cmplz-manage-options.tcf {
    display: none !important;
}
body .cmplz-cookiebanner .cmplz-buttons button.cmplz-view-preferences {
    display: none !important;
}
body .cmplz-cookiebanner .cmplz-links.cmplz-information {
    display: none !important;
}
/* Impressum link intentionally empty — hide so it doesn't render blank */
body .cmplz-cookiebanner .cmplz-documents a.impressum:empty,
body .cmplz-cookiebanner .cmplz-documents a.impressum[href*="volleyball"],
body .cmplz-cookiebanner .cmplz-documents li:has(a.impressum:empty) {
    display: none !important;
}

/* ── Preferences: category rows + gold toggles ───────────────────── */
.cmplz-cookiebanner .cmplz-category {
    border-bottom: 1px solid rgba(13,59,97,.08) !important;
    padding: 0.9rem 0 !important;
}
.cmplz-cookiebanner .cmplz-category:last-of-type { border-bottom: 0 !important; }
.cmplz-cookiebanner .cmplz-category-title {
    font-family: 'Tiempos', Georgia, serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #0D3B61 !important;
    text-transform: lowercase !important;
}
.cmplz-cookiebanner input[type="checkbox"]:checked ~ .cmplz-slider,
.cmplz-cookiebanner .cmplz-slider.cmplz-active {
    background: #f4b223 !important;
}

/* ── Browser surfaces: themed selection + focus ring ─────────────── */
.cmplz-cookiebanner ::selection {
    background: rgba(244,178,35,.4);
    color: #0D3B61;
}
.cmplz-cookiebanner *:focus-visible {
    outline: 2px solid #f4b223 !important;
    outline-offset: 2px !important;
}

/* Buttons always stack vertically, centered, uniform width — reads as
   intentional whether showing 1 button (US) or 3 buttons (EU variant) */

/* ── Mobile tweaks (≤640px): tighter padding ─────────────────────── */
@media (max-width: 640px) {
    .cmplz-cookiebanner {
        max-width: 100% !important;
        width: calc(100% - 1rem) !important;
        margin: 0.5rem !important;
        padding: 1.25rem !important;
    }
    .cmplz-cookiebanner .cmplz-title { font-size: 1.15rem !important; }
}

/* ── Respect prefers-reduced-motion (banner buttons + links) ─────── */
@media (prefers-reduced-motion: reduce) {
    .cmplz-cookiebanner .cmplz-btn,
    .cmplz-cookiebanner .cmplz-message a {
        transition: none !important;
    }
}
