/* static/css/core/legal.css */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Wrapper */
.legal-wrapper {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
}

/* Legal Header */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-header .header-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem;
    background: var(--primary-gradient);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.meta-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.meta-info span {
    color: #6b7280;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    top: 100px;
}

.toc-sidebar h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.toc-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    border-left-color: #667eea;
}

.toc-link.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.12) 0%, transparent 100%);
    color: #667eea;
    font-weight: 600;
    border-left-color: #667eea;
}

/* Legal Content */
.legal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e5e7eb;
}

.legal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    scroll-margin-top: 120px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.legal-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.legal-section ul,
.legal-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-section li {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.legal-section strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.legal-section a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.preamble-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.note-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-left: 4px solid #06b6d4;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.contact-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 2rem;
}

.contact-box h4 {
    color: #1f2937;
    margin-bottom: 1rem;
}

/* Cookie Table */
.cookie-table {
    margin: 1.5rem 0;
}

.cookie-row {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.cookie-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-type h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.badge {
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-required {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.badge-optional {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .toc-sidebar {
        position: static !important;
        margin-bottom: 2rem;
    }
    
    .toc-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.75rem;
    }
    
    .toc-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .toc-link:hover,
    .toc-link.active {
        border-left: none;
        border-bottom-color: #667eea;
    }
}

@media (max-width: 767.98px) {
    .legal-content {
        padding: 2rem 1.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-number {
        margin-bottom: 0.75rem;
    }
    
    .meta-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .cookie-type {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}