/**
 * Learn Bit - Legal Pages Styles (Unified)
 * Shared across agreement, privacy, cookies, contact
 */

.legal-page {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.legal-page .container {
    max-width: 800px;
}

.legal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legal-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-breadcrumb a:hover {
    color: var(--accent);
}

.legal-breadcrumb-sep {
    color: var(--text-muted);
    opacity: 0.4;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.legal-page .subtitle {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 8px;
}

.legal-page .updated {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.legal-sidebar-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.legal-sidebar-nav a {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.legal-sidebar-nav a:hover {
    color: var(--text-secondary);
    border-color: var(--accent);
}

.legal-sidebar-nav a.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.legal-page h2 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--accent);
}

.legal-page p, .legal-page li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-page ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-page .requisites {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.legal-page .requisites p {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.legal-page .highlight {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.legal-page .highlight p {
    margin: 0;
    color: var(--text);
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.legal-page th, .legal-page td {
    border: 1px solid var(--border);
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.legal-page th {
    background: rgba(139, 92, 246, 0.1);
    font-weight: 600;
    color: var(--text);
}

.legal-page td {
    color: var(--text-secondary);
}

.legal-page td ul {
    margin: 0;
    padding-left: 20px;
}

.legal-page td li {
    margin-bottom: 4px;
}

/* Contact Page */
.contact-page {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.contact-page .container {
    max-width: 900px;
}

.contact-page h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.contact-page .subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 16px;
    padding: 32px;
}

.contact-info h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--accent);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.contact-item h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.contact-item p {
    color: var(--text);
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.requisites-block {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.requisites-block h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.requisites-block p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 4px;
}

.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
}

.contact-form-wrapper h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.contact-form-wrapper .form-group {
    margin-bottom: 20px;
}

.contact-form-wrapper .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.contact-form-wrapper .form-group input,
.contact-form-wrapper .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.contact-form-wrapper .form-group input:focus,
.contact-form-wrapper .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form-wrapper .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-group a {
    color: var(--accent);
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--accent-hover);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Light Theme */
[data-theme="light"] .legal-sidebar-nav a {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .legal-sidebar-nav a:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .legal-sidebar-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 16px;
    }

    .legal-sidebar-nav a {
        white-space: nowrap;
    }

    .example-tabs {
        padding: 6px;
        gap: 4px;
    }

    .example-tab {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .tab-title { display: none; }
    .example-tab.active .tab-title { display: inline; }

    .examples-cta { padding: 40px 24px; }
    .examples-cta h2 { font-size: 1.4rem; }
}

/* Example Tabs (used on examples page) */
.example-tabs {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 32px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.example-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.example-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.example-tab.active {
    background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(129, 140, 248, 0.3);
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease;
}

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

.examples-cta {
    text-align: center;
    margin-top: 60px;
    padding: 56px 40px;
    background: rgba(21, 21, 32, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.examples-cta::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #818cf8, #c084fc, #f472b6);
    border-radius: 24px 24px 0 0;
}

.examples-cta h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.examples-cta p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1.05rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.examples-cta .btn-primary {
    background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
    border: none;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.examples-cta .btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(129, 140, 248, 0.35);
}

[data-theme="light"] .example-tab:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .examples-cta {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .examples-cta h2 {
    background: linear-gradient(135deg, #1a1a2e 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
