/* Legal pages styling (terms, privacy) */

.legal-page {
    width: 100%;
}

.legal-page--full-width {
    max-width: none;
}
.legal-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.legal-header h1 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.legal-header .last-updated {
    opacity: 0.85;
    font-size: 0.95rem;
}
.toc-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #cbd5e1;
}
.toc-card h5 {
    color: #1e3a5f;
    font-weight: 600;
    margin-bottom: 1rem;
}
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 2rem;
}
.toc-list li {
    margin-bottom: 0.5rem;
    break-inside: avoid;
}
.toc-list a {
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}
.toc-list a:hover {
    color: #1e3a5f;
}
.toc-list a i {
    color: #6366f1;
    font-size: 0.75rem;
}
.legal-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}
.legal-section h3 {
    color: #1e3a5f;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.legal-section h3 .section-number {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.legal-section h4 {
    color: #334155;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}
.legal-section p, .legal-section li {
    color: #475569;
    line-height: 1.7;
}
.legal-section ul {
    padding-left: 1.5rem;
}
.legal-section ul li {
    margin-bottom: 0.5rem;
}

/* Data tables (privacy policy) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid #e2e8f0;
}
.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e3a5f;
}
.data-table td {
    color: #475569;
}

/* Highlight boxes */
.highlight-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}
.highlight-box.info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left-color: #3b82f6;
}
.highlight-box.danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left-color: #ef4444;
}
.highlight-box p {
    margin: 0;
    color: #1e293b;
}

/* Contact card */
.contact-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}
.contact-card h4 {
    color: white;
    margin-bottom: 1rem;
}
.contact-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.5rem;
}
.contact-card a {
    color: #93c5fd;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #6366f1;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}
.back-to-top.visible {
    opacity: 1;
}
.back-to-top:hover {
    background: #4f46e5;
    color: white;
}

/* Dark mode */
[data-bs-theme="dark"] .legal-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
[data-bs-theme="dark"] .toc-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-color: #475569;
}
[data-bs-theme="dark"] .toc-card h5 {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .toc-list a {
    color: #94a3b8;
}
[data-bs-theme="dark"] .toc-list a:hover {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .legal-section {
    background: #1e293b;
    border-color: #334155;
}
[data-bs-theme="dark"] .legal-section h3 {
    color: #e2e8f0;
    border-bottom-color: #475569;
}
[data-bs-theme="dark"] .legal-section h4 {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .legal-section p,
[data-bs-theme="dark"] .legal-section li {
    color: #94a3b8;
}
[data-bs-theme="dark"] .data-table th {
    background: #334155;
    color: #e2e8f0;
}
[data-bs-theme="dark"] .data-table th,
[data-bs-theme="dark"] .data-table td {
    border-color: #475569;
}
[data-bs-theme="dark"] .data-table td {
    color: #94a3b8;
}
[data-bs-theme="dark"] .highlight-box {
    background: linear-gradient(135deg, #422006, #451a03);
}
[data-bs-theme="dark"] .highlight-box.info {
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
}
[data-bs-theme="dark"] .highlight-box.danger {
    background: linear-gradient(135deg, #450a0a, #7f1d1d);
}
[data-bs-theme="dark"] .highlight-box p {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .contact-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

@media (max-width: 768px) {
    .toc-list {
        columns: 1;
    }
    .legal-header {
        padding: 2rem 1.5rem;
    }
    .legal-section {
        padding: 1.5rem;
    }
}
