/*
 * PrattGamez Legal Pages
 * Scoped, reusable document styling.
 */

body.pg-legal-page {
    background: #090909 !important;
    background-image: none !important;
}

.pg-legal-page .pg-legal-main {
    background: #090909 !important;
    background-image: none !important;
    padding: 60px 20px;
    min-height: 60vh;
    box-sizing: border-box;
}

.pg-legal-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.pg-legal-document {
    background: #19151f;
    color: #f0edf3;
    border: 1px solid #382b45;
    border-top: 5px solid #7514bd;
    border-radius: 8px;
    padding: clamp(24px, 5vw, 55px);
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.pg-legal-heading {
    background: transparent !important;
    border-bottom: 1px solid #382b45;
    margin: 0 0 30px;
    padding: 0 0 24px;
}

.pg-legal-heading h1 {
    font-family: system-ui, sans-serif !important;
    font-size: clamp(30px, 5vw, 46px) !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    margin: 0 !important;
    text-transform: none !important;
}

.pg-legal-content,
.pg-legal-content #cmplz-document {
    width: 100% !important;
    max-width: none !important;
    font-family: system-ui, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400;
    line-height: 1.8 !important;
    color: #f0edf3 !important;
}

.pg-legal-content :is(p, li, td, th),
.pg-legal-content #cmplz-document :is(p, li, td, th) {
    font-family: system-ui, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #f0edf3 !important;
}

.pg-legal-content p {
    margin-bottom: 18px;
}

.pg-legal-content :is(h2, h3, h4),
.pg-legal-content #cmplz-document :is(h2, h3, h4) {
    font-family: system-ui, sans-serif !important;
    font-weight: 650 !important;
    line-height: 1.4 !important;
    color: #d084ff !important;
    text-transform: none !important;
    margin: 30px 0 15px !important;
}

.pg-legal-content h2 {
    font-size: 25px !important;
}

.pg-legal-content h3 {
    font-size: 21px !important;
}

.pg-legal-content h4 {
    font-size: 18px !important;
}

.pg-legal-content a,
.pg-legal-content #cmplz-document a {
    color: #d084ff !important;
    text-decoration: underline !important;
}

.pg-legal-content a:hover {
    color: #ffffff !important;
}

.pg-legal-content a:focus-visible {
    outline: 2px solid #d084ff;
    outline-offset: 4px;
}

.pg-legal-content #cmplz-document details {
    background: #211b29;
    border: 1px solid #483653;
    border-radius: 5px;
    margin-bottom: 10px;
}

.pg-legal-content #cmplz-document summary {
    background: #292137 !important;
    color: #ffffff !important;
}

.pg-legal-content #cmplz-document .cmplz-service-desc {
    background: #211b29 !important;
    color: #f0edf3 !important;
}

.pg-legal-content table {
    width: 100%;
    background: transparent;
}

.pg-legal-content :is(td, th) {
    border-color: #483653 !important;
}

.pg-legal-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .pg-legal-page .pg-legal-main {
        padding: 25px 12px;
    }

    .pg-legal-document {
        padding: 24px 18px;
    }

    .pg-legal-content {
        overflow-x: auto;
    }
}


/* =========================================
   PrattGamez Consent Controls
   Adapted from EpicShreds implementation
   ========================================= */

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-categories .cmplz-category {
    margin-bottom: 8px;
    border: 1px solid #483653;
    border-radius: 4px;
    background: #211b29;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-categories .cmplz-category .cmplz-category-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 24px !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    min-height: 52px;
    background: #292137;
    text-align: left !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header > :first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0;
    width: auto !important;
    text-align: left !important;
    justify-self: start !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header h2,
body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header .cmplz-category-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 600;
    line-height: 1.5;
    text-align: left !important;
    text-transform: none;
    border: 0;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header .cmplz-always-active,
body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header .cmplz-banner-checkbox {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: max-content;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header .cmplz-always-active {
    color: #85d69a;
    font-size: 12px !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-banner-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: #8500cc;
    cursor: pointer;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-category-header .cmplz-category-toggle {
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
.cmplz-description {
    padding: 14px 16px !important;
    line-height: 1.6;
}

@media (max-width: 480px) {
    body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
    .cmplz-categories .cmplz-category .cmplz-category-header {
        gap: 8px !important;
        padding: 12px 10px !important;
    }

    body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
    .cmplz-category-header h2,
    body.pg-legal-page .pg-legal-content #cmplz-document #cmplz-manage-consent-container
    .cmplz-category-header .cmplz-category-title {
        font-size: 13px !important;
    }
}

/* PrattGamez dark theme refinements */

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container .cmplz-category-header {
    background: #292137 !important;
    color: #f0edf3 !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container .cmplz-category-title {
    color: #f0edf3 !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container .cmplz-always-active {
    color: #85d69a !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container .cmplz-category-toggle {
    color: #d084ff !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container .cmplz-category-toggle svg {
    fill: currentColor !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container .cmplz-description {
    background: #211b29 !important;
    color: #f0edf3 !important;
}


/* =========================================
   PrattGamez Consent Refinements
   ========================================= */

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-categories .cmplz-category {
    margin-bottom: 8px !important;
    padding: 0 !important;
    overflow: hidden;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-categories .cmplz-category .cmplz-category-header {
    min-height: 52px !important;
    height: auto !important;
    grid-template-rows: auto !important;
    grid-auto-rows: auto !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    align-items: center !important;
    align-content: center !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-category-header > * {
    align-self: center !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-category-header .cmplz-category-title {
    line-height: 1.4 !important;
    margin: 0 !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-category-header .cmplz-always-active {
    font-size: 13px !important;
    line-height: 1.4 !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-banner-checkbox {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-banner-checkbox input[type="checkbox"] {
    color-scheme: dark;
    accent-color: #8500cc;
    vertical-align: middle;
}

body.pg-legal-page .pg-legal-content #cmplz-document
#cmplz-manage-consent-container
.cmplz-banner-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid #d084ff;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    body.pg-legal-page .pg-legal-content #cmplz-document
    #cmplz-manage-consent-container
    .cmplz-categories .cmplz-category .cmplz-category-header {
        padding: 12px 10px !important;
    }

    body.pg-legal-page .pg-legal-content #cmplz-document
    #cmplz-manage-consent-container
    .cmplz-category-header .cmplz-always-active {
        font-size: 12px !important;
    }
}
