/* fakturox Legal Pages - Glassmorphism Design (matching Login Page) */

/* ========================================
   PAGE & BACKGROUND
   ======================================== */

.legal-page {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

.legal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    z-index: -1;
}

[data-theme="light"] .legal-background {
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 50%, #CBD5E1 100%);
}

.legal-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(24, 183, 200, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(110, 235, 59, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    animation: legalRotate 30s linear infinite;
}

@keyframes legalRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Particles */
.legal-background .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.legal-background .particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(24, 183, 200, 0.4);
    border-radius: 50%;
    animation: legalFloat 25s infinite;
}

.legal-background .particle-1 { left: 10%; animation-delay: 0s; }
.legal-background .particle-2 { left: 25%; animation-delay: 3s; }
.legal-background .particle-3 { left: 40%; animation-delay: 6s; }
.legal-background .particle-4 { left: 55%; animation-delay: 9s; }
.legal-background .particle-5 { left: 70%; animation-delay: 12s; }
.legal-background .particle-6 { left: 85%; animation-delay: 15s; }

@keyframes legalFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% {
        transform: translateY(-100vh) translateX(80px);
        opacity: 0;
    }
}

/* ========================================
   THEME TOGGLE
   ======================================== */

.legal-theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .legal-theme-toggle {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(24, 183, 200, 0.2);
}

[data-theme="light"] .legal-theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(24, 183, 200, 0.2);
}

.legal-theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Theme Toggle Icons */
.legal-theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .legal-theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .legal-theme-toggle .moon-icon {
    display: block;
}

/* ========================================
   CONTAINER & CARD
   ======================================== */

.legal-container {
    display: flex;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.legal-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(24, 183, 200, 0.2);
    border-radius: 1.5rem;
    max-width: 900px;
    width: 100%;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.4),
        0 10px 10px -5px rgba(0, 0, 0, 0.3),
        0 0 60px -15px rgba(24, 183, 200, 0.2);
    position: relative;
    overflow: hidden;
    padding: 0;
    align-self: flex-start;
}

[data-theme="light"] .legal-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(24, 183, 200, 0.15);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.08),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 60px -15px rgba(24, 183, 200, 0.15);
}

/* Gradient Accent Line */
.legal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1EA7FF 0%, #18B7C8 50%, #6EEB3B 100%);
    background-size: 200% 100%;
    animation: legalShimmer 3s linear infinite;
    z-index: 2;
}

@keyframes legalShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========================================
   NAVIGATION TABS
   ======================================== */

.legal-nav {
    display: flex;
    gap: 0;
    padding: 1.25rem 2.5rem 0;
    margin-top: 4px;
    border-bottom: 1px solid rgba(24, 183, 200, 0.15);
}

.legal-nav-link {
    padding: 0.875rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -1px;
}

.legal-nav-link:hover {
    color: var(--text-primary);
    background: rgba(24, 183, 200, 0.05);
    border-radius: 8px 8px 0 0;
}

.legal-nav-link.active {
    color: #18B7C8;
    border-bottom-color: #18B7C8;
}

[data-theme="dark"] .legal-nav {
    border-bottom-color: rgba(24, 183, 200, 0.15);
}

[data-theme="light"] .legal-nav {
    border-bottom-color: rgba(24, 183, 200, 0.12);
}

/* ========================================
   HEADER
   ======================================== */

.legal-header {
    padding: 2rem 2.5rem 0;
}

.legal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.legal-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* ========================================
   CONTENT
   ======================================== */

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 2rem 2.5rem;
}

.legal-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.25px;
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-section p {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.legal-section ul {
    margin-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    padding-left: 0;
    list-style: none;
}

.legal-section ul li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    position: relative;
    padding-left: 1.25rem;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #18B7C8, #6EEB3B);
}

.legal-section address {
    font-style: normal;
    line-height: 1.8;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ========================================
   WARNING SECTIONS
   ======================================== */

.legal-section-warning h2 {
    color: #EF4444;
}

.legal-warning-box {
    background: rgba(239, 68, 68, 0.06);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #EF4444;
    margin: 1rem 0;
}

[data-theme="dark"] .legal-warning-box {
    background: rgba(239, 68, 68, 0.08);
}

.legal-warning-box p {
    color: var(--text-primary);
}

.legal-warning-box ul {
    margin-left: 1.25rem;
}

.legal-warning-box ul li {
    color: var(--text-primary);
}

.legal-warning-box ul li::before {
    background: #EF4444;
}

.legal-warning-box h3 {
    color: #EF4444;
    margin-top: 0;
}

/* Text Utilities */
.text-warning {
    color: #EF4444;
}

.text-primary {
    color: #18B7C8;
}

/* ========================================
   CONTACT LINKS
   ======================================== */

.legal-section .detail-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #18B7C8;
    text-decoration: none;
    transition: all 0.2s ease;
}

.legal-section .detail-action-link:hover {
    color: #6EEB3B;
}

.legal-section .detail-action-icon {
    width: 16px;
    height: 16px;
}

/* ========================================
   FOOTER
   ======================================== */

.legal-footer {
    padding: 1.5rem 2.5rem 2rem;
    border-top: 1px solid rgba(24, 183, 200, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1EA7FF 0%, #18B7C8 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(24, 183, 200, 0.3);
}

.legal-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(24, 183, 200, 0.4);
    background: linear-gradient(135deg, #18B7C8 0%, #6EEB3B 100%);
    color: white;
}

.legal-back-btn:active {
    transform: translateY(0) scale(0.98);
}

.legal-back-btn svg {
    width: 18px;
    height: 18px;
}

.legal-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .legal-container {
        padding: 2rem 1rem;
    }

    .legal-nav {
        padding: 1rem 1.5rem 0;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .legal-nav-link {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .legal-header {
        padding: 1.5rem 1.5rem 0;
    }

    .legal-title {
        font-size: 1.375rem;
    }

    .legal-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.0625rem;
    }

    .legal-footer {
        padding: 1.25rem 1.5rem 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .legal-back-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 1rem 0.75rem;
    }

    .legal-card {
        border-radius: 1rem;
    }

    .legal-nav {
        padding: 0.75rem 1rem 0;
    }

    .legal-nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }

    .legal-header {
        padding: 1.25rem 1.25rem 0;
    }

    .legal-content {
        padding: 1.25rem;
    }

    .legal-footer {
        padding: 1rem 1.25rem 1.25rem;
    }

    .legal-theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}
