/**
 * Legal Pages Styles
 * Privacy Policy, Cookie Policy, Terms of Service
 */

/* Header override for legal pages */
.header-legal {
    background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main content */
.legal-content {
    padding: 120px 0 80px;
    min-height: calc(100vh - 200px);
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.legal-subtitle {
    font-size: 1.125rem;
    color: var(--gray-light);
    margin-bottom: 0.5rem;
}

.legal-update {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sections */
.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--white);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.legal-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--gray-light);
}

.legal-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

.legal-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-section li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-light);
    margin-bottom: 0.5rem;
}

.legal-section li strong {
    color: var(--white);
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Info boxes */
.info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    line-height: 1.8;
    color: var(--gray-light);
}

.info-box strong {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.info-box a {
    color: var(--primary);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.lang-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
}

.lang-option:hover {
    color: var(--white);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.lang-option.active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

/* Tables */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-table th {
    background: rgba(99, 102, 241, 0.15);
    color: var(--white);
    font-weight: 600;
}

.cookie-table td {
    color: var(--gray-light);
}

.cookie-table code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--secondary);
}

.cookie-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Footer legal */
.footer-legal {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.footer-legal .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal-links a:hover {
    color: var(--white);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.25rem;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text p {
    color: var(--gray-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--primary);
    text-decoration: none;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.cookie-btn-accept {
    background: var(--primary);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--gray-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--gray);
    border: none;
    text-decoration: underline;
    padding: 0.75rem 0.5rem;
}

.cookie-btn-settings:hover {
    color: var(--white);
}

/* Hide cookie banner when accepted */
.cookie-banner.hidden {
    display: none;
}

/* Cookie Settings Panel */
.cookie-settings-panel {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease;
}

.cookie-settings-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-settings-header {
    margin-bottom: 1.25rem;
}

.cookie-settings-header h4 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cookie-settings-header p {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-settings-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cookie-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
}

.cookie-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.cookie-option-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.cookie-option-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-option-name {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
}

.cookie-option-required {
    color: var(--gray);
    font-size: 0.8rem;
    font-style: italic;
}

.cookie-option-desc {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.5rem 0 0 1.75rem;
}

.cookie-settings-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-btn-save {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-save:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-accept-all {
    background: var(--primary);
    color: white;
}

.cookie-btn-accept-all:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-content {
        padding: 100px 0 60px;
    }

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

    .legal-section h2 {
        font-size: 1.25rem;
    }

    .cookie-table {
        font-size: 0.8rem;
    }

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

    .footer-legal .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .language-switcher {
        margin-right: 0.5rem;
    }

    .lang-option {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }

    .cookie-settings-panel {
        padding: 1rem;
    }

    .cookie-settings-actions {
        flex-direction: column;
    }

    .cookie-settings-actions .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .legal-content h1 {
        font-size: 1.5rem;
    }

    .info-box {
        padding: 1rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}
