/* Legal Pages Styles (Terms & Privacy)
   ========================================================================== */

/* Layout
   ========================================================================== */
.legal-page {
    display: flex;
    min-height: calc(100vh - 80px);
    background: var(--background);
    position: relative;
    gap: 2rem;
    padding: 2rem;
    margin-top: 80px;
}

/* Sidebar Navigation
   ========================================================================== */
.legal-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: calc(80px + 2rem);
    height: calc(100vh - 80px - 4rem);
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--background-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--background-card);
}

.legal-sidebar::-webkit-scrollbar {
    width: 4px;
}

.legal-sidebar::-webkit-scrollbar-track {
    background: var(--background-card);
}

.legal-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: var(--radius-full);
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-item:hover {
    color: white;
    background: var(--background);
    border-radius: var(--radius-md);
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.nav-link.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    font-weight: 500;
}

/* Main Content
   ========================================================================== */
.legal-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    background: var(--background-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.legal-header {
    margin: 3rem 0;
    text-align: center;
    position: relative;
}

.legal-header::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.last-updated {
    color: var(--text-light);
    font-size: 0.875rem;
}

.section {
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease-out;
}

.section-title {
    color: var(--text);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}

/* Typography
   ========================================================================== */
.legal-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1rem;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-light);
}

.legal-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    position: relative;
}

.legal-content li::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.75rem;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.legal-content a:hover {
    border-bottom-color: var(--primary);
}

/* Progress Bar
   ========================================================================== */
.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--background);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.2s ease;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* Feedback Button
   ========================================================================== */
.feedback-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 90;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.feedback-button svg {
    width: 16px;
    height: 16px;
}

/* Modal
   ========================================================================== */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.feedback-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--background-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    animation: modalSlideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
    border-radius: var(--radius-md);
}

.modal-close:hover {
    color: var(--text);
    background: var(--background);
}

.feedback-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text);
    margin-bottom: 1rem;
    resize: vertical;
    font-family: var(--font-main);
    transition: all 0.2s ease;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Animations
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Print Styles
   ========================================================================== */
@media print {
    .legal-page {
        display: block;
        margin: 0;
        padding: 2rem;
    }

    .legal-sidebar,
    .feedback-button,
    .progress-container,
    .menu-toggle {
        display: none !important;
    }

    .legal-content {
        max-width: none;
        padding: 0;
        background: none;
        border: none;
    }

    .text-gradient {
        color: black;
        background: none;
    }

    .section-title {
        border-bottom-color: #000;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .legal-page {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .legal-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .legal-page {
        display: block;
        padding: 1rem;
    }

    .legal-sidebar {
        position: fixed;
        top: 80px;
        left: -280px;
        height: calc(100vh - 80px);
        background: var(--background-card);
        border-radius: 0;
        border-right: 1px solid var(--border);
        border-top: none;
        border-bottom: none;
        padding: 2rem 1.5rem;
        transition: left 0.3s ease;
        z-index: 90;
    }

    .legal-sidebar.active {
        left: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .legal-content {
        margin-top: 1rem;
        padding: 1.5rem;
    }

    .text-gradient {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 0.5rem;
    }

    .legal-content {
        padding: 1rem;
    }

    .feedback-button {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

/* Mobile Menu Toggle
   ========================================================================== */
.menu-toggle {
    display: none;
    position: fixed;
    top: calc(80px + 1rem);
    right: 1rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    z-index: 95;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: var(--background);
    color: var(--primary);
} 