/* Legal Pages - Terms of Service & Privacy Policy */

.legal-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--zf-border);
}

.legal-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--zf-text-primary);
    margin-bottom: 0.5rem;
}

.legal-effective-date {
    font-size: 0.9rem;
    color: var(--zf-text-secondary);
}

.legal-content {
    line-height: 1.75;
    color: var(--zf-text-primary);
}

.legal-section {
    margin-bottom: 2.5rem;
}

/* Apply the same styling to bare elements rendered by Markdig (CMS body via
   Html.Raw inside .legal-content) AND to elements inside hardcoded
   <section class="legal-section"> wrappers. */

.legal-section h2,
.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--zf-text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--zf-border);
}

.legal-section h2:first-child,
.legal-content > h2:first-child {
    margin-top: 0;
}

.legal-section h3,
.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--zf-text-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-section p,
.legal-content p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--zf-text-primary);
}

.legal-section ul,
.legal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section ul li,
.legal-content ul li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--zf-text-primary);
}

.legal-section a,
.legal-content a {
    color: var(--zf-link);
}

.legal-section a:hover,
.legal-content a:hover {
    text-decoration: underline !important;
}

/* Contact list */
.legal-contact {
    list-style: none;
    padding-left: 0;
}

.legal-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legal-contact li i {
    color: var(--zf-text-secondary);
    font-size: 1rem;
}

/* Table styling — applies to both <table class="legal-table"> in hardcoded views
   and bare <table> rendered by Markdig pipe tables inside .legal-content. */
.legal-table,
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

.legal-table th,
.legal-table td,
.legal-content table th,
.legal-content table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--zf-border);
}

.legal-table th,
.legal-content table th {
    background-color: var(--zf-section-bg);
    font-weight: 600;
    color: var(--zf-text-primary);
}

.legal-table td,
.legal-content table td {
    color: var(--zf-text-primary);
}

.legal-table tr:nth-child(even) td,
.legal-content table tr:nth-child(even) td {
    background-color: var(--zf-section-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-page {
        padding: 1.5rem 1rem 3rem;
    }

    .legal-header h1 {
        font-size: 1.75rem;
    }

    .legal-section h2,
    .legal-content h2 {
        font-size: 1.2rem;
    }

    .legal-table,
    .legal-content table {
        font-size: 0.85rem;
    }

    .legal-table th,
    .legal-table td,
    .legal-content table th,
    .legal-content table td {
        padding: 0.5rem 0.75rem;
    }
}
