/* ============================================
   PRIVACY POLICY PAGE - Bio-Link.se
   All styles for legal/privacy pages
   ============================================ */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-900: #212529;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,0.175);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* ============================================
   2. NAVBAR ENHANCEMENTS
   ============================================ */
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    color: var(--primary) !important;
}

/* ============================================
   3. LEGAL HEADER
   ============================================ */
.legal-header {
    position: relative;
    overflow: hidden;
}

.legal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.legal-header h1 {
    position: relative;
}

.legal-header p.lead {
    color: rgba(255,255,255,0.95);
    font-size: 1.2rem;
    position: relative;
}

.legal-meta {
    font-size: 0.95rem;
    position: relative;
}

.legal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   4. TABLE OF CONTENTS
   ============================================ */
.toc-wrapper::-webkit-scrollbar {
    width: 6px;
}

.toc-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.toc-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-list a {
    color: var(--gray-700);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   5. LEGAL CONTENT SECTIONS
   ============================================ */
.legal-section h2 {
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-section p {
    margin-bottom: 1rem;
    color: var(--gray-700);
    line-height: 1.8;
}

.legal-section ul,
.legal-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    line-height: 1.8;
}

/* ============================================
   6. ALERT BOXES
   ============================================ */
.alert-box {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    border-left: 4px solid;
}

.alert-danger {
    background: #fff5f5;
    border-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background: #fffbf0;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: #f0f7ff;
    border-color: var(--primary);
    color: #004085;
}

.alert-success {
    background: #f0fff4;
    border-color: var(--success);
    color: #155724;
}

.alert-box h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
}

/* ============================================
   7. DATA COLLECTION BOX
   ============================================ */
.data-box {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.data-category {
    margin-bottom: 2rem;
}

.data-category:last-child {
    margin-bottom: 0;
}

.data-category h4 {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-category ul {
    margin-bottom: 0;
}

/* ============================================
   8. RIGHTS GRID
   ============================================ */
.right-item {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.right-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.right-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.right-item h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.right-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray-600);
}

/* ============================================
   9. CONTACT BOX
   ============================================ */
.contact-box {
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
}

.contact-box h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.contact-item:hover {
    background: var(--gray-50);
}

.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-details strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-details a {
    color: var(--primary);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* ============================================
   10. SPECIAL BADGES
   ============================================ */
.gdpr-badge {
    background: var(--success);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.last-updated {
    background: var(--gray-50);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
    font-size: 0.95rem;
}

.last-updated strong {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   11. PRINT BUTTON
   ============================================ */
.print-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease;
    z-index: 1000;
}

.print-button:hover {
    transform: scale(1.1);
}

/* ============================================
   12. BUTTONS
   ============================================ */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
    text-decoration: none;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

/* Mobile (≤992px) */
@media (max-width: 992px) {
    .legal-content {
        padding: 2rem 1rem;
    }

    .print-button {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .rights-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile (≤768px) */
@media (max-width: 768px) {
    .legal-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .legal-section h3 {
        font-size: 1.25rem;
    }
}

/* ============================================
   14. PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .toc-wrapper,
    .print-button,
    footer {
        display: none !important;
    }

    .legal-content {
        padding: 0;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .alert-box,
    .contact-box,
    .data-box {
        border: 1px solid #000;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h2 {
        page-break-after: avoid;
    }
}

/* ============================================
   15. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}