/**
 * Legal Pages Stylesheet
 * Used by: terms.php, privacy.php, refunds.php
 * Class prefix: .legal-*
 */

/* ==========================================================================
   Layout
   ========================================================================== */
.legal-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .legal-layout {
        grid-template-columns: 250px 1fr;
    }
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.legal-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .legal-sidebar {
        display: block;
        position: sticky;
        top: 100px;
    }
}

.legal-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--v2-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
}

.legal-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.legal-sidebar-nav a {
    display: block;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--v2-text-muted);
    text-decoration: none;
    border-radius: var(--v2-radius-md);
    transition: all 0.2s;
}

.legal-sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--v2-text-light);
}

.legal-sidebar-nav a.active {
    background: rgba(0, 255, 209, 0.1);
    color: var(--v2-primary);
}

/* ==========================================================================
   Download Card
   ========================================================================== */
.legal-download-card {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 255, 209, 0.1);
    border: 1px solid rgba(0, 255, 209, 0.2);
    border-radius: var(--v2-radius-lg);
}

.legal-download-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--v2-text-light);
    margin-bottom: 0.5rem;
}

.legal-download-card h4 i {
    color: var(--v2-primary);
}

.legal-download-card p {
    font-size: 0.75rem;
    color: var(--v2-text-muted);
    margin-bottom: 0.75rem;
}

.legal-download-card button {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--v2-primary);
    background: transparent;
    border: 1px solid rgba(0, 255, 209, 0.3);
    border-radius: var(--v2-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.legal-download-card button:hover {
    background: var(--v2-primary);
    color: #0d1117;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.legal-content {
    background: var(--v2-surface-dark);
    border: 1px solid var(--v2-border-light);
    border-radius: var(--v2-radius-xl);
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .legal-content {
        padding: 2.5rem;
    }
}

@media (min-width: 768px) {
    .legal-content {
        padding: 3rem;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */
.legal-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--v2-border-light);
}

.legal-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 255, 209, 0.1);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--v2-primary);
    margin-bottom: 0.75rem;
}

.legal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--v2-text-light);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .legal-title {
        font-size: 2rem;
    }
}

.legal-date {
    font-size: 0.875rem;
    color: var(--v2-text-muted);
}

.legal-intro {
    font-size: 1rem;
    color: var(--v2-text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Section Content
   ========================================================================== */
.legal-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--v2-text-light);
    margin-bottom: 1rem;
}

.legal-section h2 .number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 255, 209, 0.15);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--v2-primary);
    flex-shrink: 0;
}

.legal-section p {
    font-size: 0.9375rem;
    color: var(--v2-text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.legal-section ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--v2-text-muted);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.legal-section ul li::before {
    content: "✓";
    color: var(--v2-primary);
    font-weight: bold;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.legal-section a {
    color: var(--v2-primary);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--v2-text-light);
    margin: 1rem 0 0.5rem;
}

/* ==========================================================================
   Callout Box
   ========================================================================== */
.legal-callout {
    background: rgba(0, 255, 209, 0.05);
    border-left: 4px solid var(--v2-primary);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--v2-radius-md) var(--v2-radius-md) 0;
    margin: 1rem 0;
}

.legal-callout p {
    font-size: 0.875rem;
    color: var(--v2-text-light);
    font-style: italic;
    margin: 0;
}

.legal-callout strong {
    color: var(--v2-primary);
}

/* Blue callout variant (used in refunds) */
.legal-callout.blue {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 4px solid #3b82f6;
}

.legal-callout.blue h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 0.5rem;
}

.legal-callout.blue p {
    color: #93c5fd;
    font-style: normal;
}

/* ==========================================================================
   Contact Card
   ========================================================================== */
.legal-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: var(--v2-radius-lg);
    margin-top: 2rem;
}

.legal-contact-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--v2-text-light);
    margin-bottom: 0.25rem;
}

.legal-contact-text p {
    font-size: 0.875rem;
    color: var(--v2-text-muted);
    margin: 0;
}

/* ==========================================================================
   Tabs Navigation
   ========================================================================== */
.legal-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--v2-border-light);
    overflow-x: auto;
}

.legal-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    min-width: 100px;
    text-decoration: none;
    color: var(--v2-text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.legal-tab:hover {
    color: var(--v2-text-light);
    border-bottom-color: rgba(0, 255, 209, 0.3);
}

.legal-tab.active {
    color: var(--v2-primary);
    border-bottom-color: var(--v2-primary);
}

.legal-tab i {
    font-size: 1.25rem;
    margin-bottom: 0.375rem;
}

.legal-tab span {
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}