/**
 * Terms, Privacy, Cookie — page shell + imported legal document styling.
 * Loaded only when $loadLegalPageCss is set before includes/header.php.
 */

/* ----- Page shell ----- */
.legal-page {
    position: relative;
    min-height: 100vh;
    padding: 4.5rem 0 3rem;
    overflow: hidden;
    background: #0a0a0a;
}

@media (min-width: 640px) {
    .legal-page {
        padding: 5rem 0 3.5rem;
    }
}

@media (min-width: 768px) {
    .legal-page {
        padding: 6rem 0;
    }
}

.legal-page__container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1024px) {
    .legal-page__container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.legal-page__inner {
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.legal-page__meta {
    margin-bottom: 2rem;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 1.5rem;
}

.legal-page__meta-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e5e7eb;
    letter-spacing: 0.025em;
}

.legal-page__card {
    overflow-x: auto;
    text-align: left;
    padding: 1.5rem;
    border-radius: 1rem;
}

@media (min-width: 640px) {
    .legal-page__card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .legal-page__card {
        padding: 2.5rem;
    }
}

.legal-page__footer {
    text-align: center;
    margin-top: 2rem;
}

.legal-page__back {
    display: inline-flex;
    align-items: center;
    color: #c4b5fd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-page__back:hover {
    color: #d8b4fe;
}

.legal-page__back .legal-page__back-icon {
    margin-right: 0.5rem;
}

/* ----- Imported legal HTML (#jdmatch-legal-doc) ----- */
#jdmatch-legal-doc.legal-import {
    width: 100%;
    max-width: none;
    text-align: left;
    font-size: 15px;
    line-height: 1.625;
}

#jdmatch-legal-doc.legal-import ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

#jdmatch-legal-doc.legal-import li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

#jdmatch-legal-doc.legal-import table {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: collapse;
}

#jdmatch-legal-doc.legal-import th {
    text-align: left;
    vertical-align: top;
    padding: 0.5rem 0.75rem 0.5rem 0;
}

#jdmatch-legal-doc.legal-import td {
    vertical-align: top;
    padding: 0.5rem 0.75rem 0.5rem 0;
}

#jdmatch-legal-doc.legal-import section {
    max-width: none;
}

#jdmatch-legal-doc.legal-import img,
#jdmatch-legal-doc.legal-import svg {
    max-width: 100%;
    height: auto;
}

#jdmatch-legal-doc.legal-import pre {
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Word list / paragraph defaults (often were inline text-indent, justify, white bg) */
#jdmatch-legal-doc .MsoNormal,
#jdmatch-legal-doc .MsoListParagraph,
#jdmatch-legal-doc li,
#jdmatch-legal-doc p {
    text-align: left !important;
    text-indent: 0 !important;
    background-color: transparent !important;
    font-style: normal !important;
    font-weight: inherit !important;
}

/* Override Word/DOCX inline colors on dark theme */
#jdmatch-legal-doc,
#jdmatch-legal-doc * {
    color: #ffffff !important;
}

#jdmatch-legal-doc a,
#jdmatch-legal-doc a * {
    color: #d8b4fe !important;
    text-decoration-color: rgba(216, 180, 254, 0.6) !important;
    word-break: break-word;
}

#jdmatch-legal-doc a:hover,
#jdmatch-legal-doc a:hover * {
    color: #f5d0fe !important;
}

#jdmatch-legal-doc h1,
#jdmatch-legal-doc h2,
#jdmatch-legal-doc h3 {
    font-weight: 700 !important;
}

#jdmatch-legal-doc th {
    color: #f1f5f9 !important;
    font-weight: 600 !important;
}

#jdmatch-legal-doc td {
    color: #ffffff !important;
}
