/* Legal Pages Styles */

/* Main Container */
.legal-main {
  padding-top: 6rem;
  min-height: 100vh;
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

/* Hero Section */
.legal-hero {
  padding: 3rem 0 4rem;
  text-align: center;
}

.legal-hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.legal-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: var(--secondary);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.legal-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.legal-subtitle {
  font-size: 1rem;
  color: var(--muted-foreground);
}

/* Compliance Section */
.compliance-section {
  padding-bottom: 2rem;
}

.compliance-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.compliance-badge svg {
  color: var(--accent);
}

/* Table of Contents */
.toc-section {
  padding: 2rem 0;
}

.toc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.toc-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

.toc-link {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  background: var(--secondary);
  border-radius: calc(var(--radius) - 4px);
  transition: all 0.2s ease;
}

.toc-link:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

/* Content Section */
.legal-content {
  padding: 3rem 0 6rem;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

/* Introduction Box */
.intro-box {
  background: var(--secondary);
  border-left: 4px solid var(--accent);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 3rem;
}

.intro-box p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--foreground);
}

/* Legal Sections */
.legal-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-of-type {
  border-bottom: none;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.section-content p:last-child {
  margin-bottom: 0;
}

.subsection-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 2rem 0 1rem;
}

.subsection-heading:first-child {
  margin-top: 0;
}

/* Lists */
.legal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.legal-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.legal-list li strong {
  font-weight: 600;
}

/* Info Box */
.info-box {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--secondary);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.info-box svg {
  flex-shrink: 0;
  color: var(--accent);
}

.info-box p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* Warning Box */
.warning-box {
  padding: 1.25rem 1.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.warning-box p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--foreground);
}

.dark .warning-box {
  background: rgba(245, 158, 11, 0.15);
}

/* Data Table */
.data-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

.data-row {
  display: flex;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.data-row:last-child {
  border-bottom: none;
}

.data-type {
  width: 160px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--foreground);
}

.data-examples {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Collection Methods */
.collection-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.method-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.method-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--secondary);
  border-radius: 50%;
  margin-bottom: 1rem;
  color: var(--accent);
}

.method-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.method-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* Legal Basis Box */
.legal-basis-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.legal-basis-box h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.legal-basis-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-basis-box li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.legal-basis-box li strong {
  color: var(--foreground);
}

/* Cookie Table */
.cookie-table {
  margin: 1.5rem 0;
}

.cookie-row {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.cookie-type {
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: calc(var(--radius) - 4px);
}

.cookie-type.essential {
  background: rgba(34, 197, 94, 0.15);
  color: rgb(34, 197, 94);
}

.cookie-type.functional {
  background: rgba(59, 130, 246, 0.15);
  color: rgb(59, 130, 246);
}

.cookie-type.analytics {
  background: rgba(168, 85, 247, 0.15);
  color: rgb(168, 85, 247);
}

.cookie-desc strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.cookie-desc p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Retention Table */
.retention-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

.retention-row {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.retention-row:last-child {
  border-bottom: none;
}

.retention-type {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--foreground);
}

.retention-period {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Security Grid */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.security-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.security-item svg {
  color: var(--accent);
  margin-bottom: 1rem;
}

.security-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.security-item p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* Rights Grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.right-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.right-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.right-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* Contact Box */
.contact-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-item:first-child {
  padding-top: 0;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.contact-value {
  font-size: 1rem;
  color: var(--foreground);
}

a.contact-value {
  color: var(--accent);
  transition: opacity 0.2s ease;
}

a.contact-value:hover {
  opacity: 0.8;
}

/* Related Links */
.related-links {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.related-grid {
  display: grid;
  gap: 1rem;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-card svg {
  flex-shrink: 0;
  color: var(--accent);
}

.related-card-title {
  display: block;
  font-weight: 600;
  color: var(--foreground);
}

.related-card-desc {
  display: block;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 768px) {
  .legal-main {
    padding-top: 5rem;
  }

  .legal-hero {
    padding: 2rem 0 3rem;
  }

  .toc-card {
    padding: 1.5rem;
  }

  .toc-nav {
    grid-template-columns: 1fr;
  }

  .section-heading {
    font-size: 1.25rem;
  }

  .data-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .data-type {
    width: auto;
  }

  .cookie-row {
    flex-direction: column;
  }

  .retention-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .collection-methods,
  .security-grid,
  .rights-grid {
    grid-template-columns: 1fr;
  }

  .related-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .legal-title {
    font-size: 1.75rem;
  }

  .section-heading {
    flex-direction: column;
    text-align: center;
  }

  .section-number {
    margin-bottom: 0.5rem;
  }

  .intro-box {
    padding: 1.25rem;
  }

  .compliance-badges {
    flex-direction: column;
    align-items: center;
  }
}
