/*
 * Module: 08-cookies.css
 *
 * Purpose: Complianz and cookie-banner overrides tailored to the portal.
 *
 * Notes: This module only handles consent UI and cookie management presentation.
 * Source range from former theme.css: lines 2421-2727.
 */

body .cmplz-cookiebanner,
body .cmplz-manage-consent {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

body #cmplz-cookiebanner-container {
    width: 100%;
    position: relative !important;
    z-index: 140;
}

body .cmplz-cookiebanner {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    inset: auto !important;
    transform: none !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: var(--govgr-text) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--govgr-border-soft) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body .cmplz-cookiebanner.cmplz-hidden,
body .cmplz-cookiebanner.cmplz-dismissed {
    display: none !important;
}

body .cmplz-cookiebanner.cmplz-show {
    display: block !important;
}

body .cmplz-cookiebanner .cmplz-title,
body .cmplz-cookiebanner .cmplz-category-title,
body .cmplz-cookiebanner .cmplz-message,
body .cmplz-cookiebanner .cmplz-description,
body .cmplz-cookiebanner .cmplz-links .cmplz-link {
    color: #0b0c0c !important;
}

body .cmplz-cookiebanner .cmplz-header,
body .cmplz-cookiebanner .cmplz-body,
body .cmplz-cookiebanner .cmplz-buttons,
body .cmplz-cookiebanner .cmplz-documents {
    max-width: var(--govgr-shell-max-width) !important;
    margin: 0 auto !important;
    padding-left: var(--govgr-shell-gutter) !important;
    padding-right: var(--govgr-shell-gutter) !important;
    box-sizing: border-box !important;
}

body .cmplz-cookiebanner .cmplz-header {
    display: block !important;
    padding-top: 1rem !important;
    padding-bottom: 0.25rem !important;
}

body .cmplz-cookiebanner .cmplz-logo,
body .cmplz-cookiebanner .cmplz-close {
    display: none !important;
}

body .cmplz-cookiebanner .cmplz-title {
    display: block !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

body .cmplz-cookiebanner .cmplz-body {
    width: auto !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body .cmplz-cookiebanner .cmplz-message {
    max-width: 62rem !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

body .cmplz-cookiebanner .cmplz-categories {
    display: none !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
}

body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-categories {
    display: grid !important;
}

body .cmplz-cookiebanner .cmplz-category {
    border: 1px solid var(--govgr-border-soft) !important;
    border-radius: 0 !important;
    background: #f8fafc !important;
    overflow: hidden;
}

body .cmplz-cookiebanner .cmplz-category summary {
    padding: 0.85rem 1rem !important;
}

body .cmplz-cookiebanner .cmplz-description {
    padding: 0 1rem 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

body .cmplz-cookiebanner .cmplz-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 0.65rem 1rem !important;
    width: auto !important;
    border-width: 2px !important;
    border-style: solid !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

body .cmplz-cookiebanner .cmplz-btn.cmplz-accept,
body .cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences {
    background: #003476 !important;
    border-color: #003476 !important;
    color: #ffffff !important;
}

body .cmplz-cookiebanner .cmplz-btn.cmplz-deny,
body .cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences,
body .cmplz-cookiebanner .cmplz-btn.cmplz-manage-options {
    background: #ffffff !important;
    border-color: #003476 !important;
    color: #003476 !important;
}

body .cmplz-cookiebanner .cmplz-links.cmplz-information {
    display: none !important;
}

body .cmplz-cookiebanner .cmplz-documents ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 1rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .cmplz-cookiebanner .cmplz-documents {
    max-width: var(--govgr-shell-max-width) !important;
    margin: 0 auto !important;
    padding: 0 var(--govgr-shell-gutter) 0.85rem !important;
    box-sizing: border-box !important;
}

body .cmplz-cookiebanner .cmplz-documents .cmplz-link {
    color: #003476 !important;
    font-size: 0.9rem !important;
    text-decoration: underline !important;
}

body .cmplz-cookiebanner .cmplz-documents .cmplz-link:hover,
body .cmplz-cookiebanner .cmplz-documents .cmplz-link:focus {
    color: #003476 !important;
}

body .cmplz-cookiebanner .cmplz-divider,
body .cmplz-cookiebanner .cmplz-header {
    background: transparent !important;
}

body .cmplz-cookiebanner .cmplz-divider {
    display: none !important;
}

body .cmplz-cookiebanner .cmplz-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 1rem !important;
}

body .cmplz-cookiebanner:not(.cmplz-categories-visible) .cmplz-save-preferences {
    display: none !important;
}

body .cmplz-cookiebanner .cmplz-buttons a.cmplz-btn.tcf,
body .cmplz-cookiebanner .cmplz-buttons .cmplz-manage-options.tcf {
    display: none !important;
}

body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-view-preferences {
    display: none !important;
}

body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-save-preferences {
    display: inline-flex !important;
}

body .cmplz-cookiebanner .cmplz-category .cmplz-description-functional,
body .cmplz-cookiebanner .cmplz-category .cmplz-description-preferences,
body .cmplz-cookiebanner .cmplz-category .cmplz-description-statistics,
body .cmplz-cookiebanner .cmplz-category .cmplz-description-statistics-anonymous,
body .cmplz-cookiebanner .cmplz-category .cmplz-description-marketing {
    color: var(--govgr-muted) !important;
}

body .cmplz-manage-consent {
    right: 1rem !important;
    bottom: 1rem !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 0.65rem 1rem !important;
    border: 2px solid #003476 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #003476 !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

body #cmplz-manage-consent,
body #cmplz-manage-consent .cmplz-manage-consent {
    display: none !important;
}

body.cmplz-no-decision #cmplz-manage-consent .cmplz-manage-consent {
    display: none !important;
}

.govgr-post-content img {
    border-radius: 0;
}

.govgr-page-layout {
    padding-top: 2.5rem;
}

.govgr-content-grid {
    gap: 2rem;
}

.govgr-post-content h2 {
    border-bottom-color: var(--govgr-border-soft);
}

.govgr-table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.govgr-cookie-banner {
    background: #ffffff;
    border-top: 4px solid var(--govgr-blue);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
    padding: 1rem 0;
}

.govgr-cookie-banner[hidden] {
    display: none !important;
}

.govgr-cookie-banner.show {
    display: block !important;
}

.govgr-cookie-copy {
    max-width: 44rem;
}

.govgr-cookie-title {
    margin: 0 0 0.35rem !important;
    color: var(--govgr-text) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

.govgr-cookie-banner p {
    color: var(--govgr-text) !important;
    font-size: 0.9rem !important;
}

.govgr-cookie-banner a {
    color: var(--govgr-blue);
}
