/* Legal Pages Styles */

/* Privacy Badges */
.privacy-badges {
  display: flex;
  justify-content: center;
  gap: var(--gap-md);
  margin-top: var(--gap-md);
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: var(--gap-xs) var(--gap-sm);
  background: var(--accent-2);
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.badge i {
  font-size: 16px;
  color: var(--success);
}

/* Legal Layout */
.legal-content {
  padding: var(--gap-lg) 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

/* Legal Sidebar */
.legal-sidebar {
  position: sticky;
  top: 100px;
}

.legal-nav h3 {
  margin-bottom: var(--gap-md);
  color: var(--text);
  font-size: 16px;
}

.legal-nav {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
}

.nav-item {
  display: block;
  padding: var(--gap-xs) var(--gap-sm);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--text);
  border-left-color: var(--accent-2);
}

.nav-item.active {
  background: var(--accent-2);
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--outline);
}

/* Legal Main Content */
.legal-main {
  max-width: 800px;
}

.legal-intro {
  background: var(--accent-2);
  padding: var(--gap-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--gap-lg);
  border: 2px solid var(--outline);
}

.legal-intro p {
  margin-bottom: var(--gap-sm);
}

.legal-intro p:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

/* Legal Articles */
.legal-article {
  margin-bottom: var(--gap-lg);
  scroll-margin-top: 120px;
}

.legal-article h2 {
  color: var(--text);
  margin-bottom: var(--gap-md);
  padding-bottom: var(--gap-sm);
  border-bottom: 2px solid var(--outline);
  font-size: 24px;
}

.article-content {
  line-height: 1.6;
}

.article-content h3 {
  color: var(--text);
  margin: var(--gap-md) 0 var(--gap-sm);
  font-size: 18px;
}

.article-content h4 {
  color: var(--text);
  margin: var(--gap-sm) 0 var(--gap-xs);
  font-size: 16px;
}

.article-content p {
  margin-bottom: var(--gap-sm);
  color: var(--text);
}

.article-content ul,
.article-content ol {
  margin: var(--gap-sm) 0;
  padding-left: var(--gap-md);
}

.article-content li {
  margin-bottom: var(--gap-xs);
  color: var(--text);
  line-height: 1.5;
}

.article-content strong {
  font-weight: 600;
  color: var(--text);
}

/* Contact Info Box */
.contact-info {
  background: var(--bg);
  padding: var(--gap-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--outline);
  margin: var(--gap-md) 0;
}

.contact-info p {
  margin-bottom: var(--gap-xs);
  font-size: 14px;
  line-height: 1.4;
}

/* Retention Table */
.retention-table {
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: var(--gap-md) 0;
}

.retention-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: var(--gap-sm) var(--gap-md);
  border-bottom: 1px solid var(--outline);
}

.retention-item:last-child {
  border-bottom: none;
}

.retention-item:nth-child(even) {
  background: var(--bg);
}

.data-type {
  font-weight: 600;
  color: var(--text);
}

.retention-period {
  color: var(--text-secondary);
  text-align: right;
}

/* Rights Exercise Box */
.rights-exercise {
  background: var(--accent-1);
  padding: var(--gap-md);
  border-radius: var(--radius-sm);
  margin: var(--gap-md) 0;
}

.rights-exercise h4 {
  margin-bottom: var(--gap-sm);
  color: var(--text);
}

.rights-exercise p,
.rights-exercise ul {
  margin-bottom: var(--gap-sm);
}

.rights-exercise li {
  margin-bottom: 4px;
}

/* Legal Footer */
.legal-footer {
  background: var(--bg);
  padding: var(--gap-lg);
  border-radius: var(--radius-sm);
  border: 2px solid var(--outline);
  margin-top: var(--gap-lg);
  text-align: center;
}

.legal-footer h2 {
  margin-bottom: var(--gap-md);
  color: var(--text);
}

.legal-footer p {
  margin-bottom: var(--gap-sm);
}

.legal-footer ul {
  list-style: none;
  padding: 0;
  margin: var(--gap-sm) 0;
}

.legal-footer li {
  margin-bottom: 4px;
}

.legal-footer em {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Links in legal content */
.article-content a {
  color: var(--text);
  text-decoration: underline;
  font-weight: 600;
}

.article-content a:hover {
  color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }
  
  .legal-sidebar {
    position: static;
    order: 2;
  }
  
  .legal-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: var(--gap-sm);
    padding-bottom: var(--gap-xs);
  }
  
  .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: var(--gap-xs);
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .nav-item:hover,
  .nav-item.active {
    border-left: none;
    border-bottom-color: var(--outline);
  }
  
  .privacy-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .retention-item {
    grid-template-columns: 1fr;
    gap: var(--gap-xs);
  }
  
  .retention-period {
    text-align: left;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .legal-article h2 {
    font-size: 20px;
  }
  
  .article-content h3 {
    font-size: 16px;
  }
  
  .legal-intro,
  .contact-info,
  .rights-exercise,
  .legal-footer {
    padding: var(--gap-sm);
  }
  
  .badge {
    font-size: 12px;
  }
}

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  .legal-sidebar,
  .navbar,
  .footer {
    display: none;
  }
  
  .legal-layout {
    grid-template-columns: 1fr;
  }
  
  .legal-article {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .legal-article h2 {
    page-break-after: avoid;
  }
}

/* Focus states for accessibility */
.nav-item:focus {
  outline: 3px solid var(--accent-3);
  outline-offset: 2px;
}

/* Animation for smooth transitions */
.nav-item,
.badge {
  transition: all 0.2s ease;
}

/* Highlight for active section while scrolling */
.nav-item.current {
  background: var(--accent-3);
  color: var(--text);
  font-weight: 600;
}