/*
 * legal.css — Shared styles for all HR Droids legal pages.
 *
 * Matches the dark sci-fi theme of the main landing page:
 *   --cyan   #00f5ff  (accent / links)
 *   --purple #7b2fff  (secondary accent)
 *   --dark   #030314  (background)
 *   Fonts: Orbitron (headings) + Inter (body)
 */

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cyan:   #00f5ff;
  --purple: #7b2fff;
  --pink:   #ff2d78;
  --dark:   #030314;
  --dark2:  #0a0a2e;
  --text:   rgba(255, 255, 255, .82);
  --muted:  rgba(255, 255, 255, .45);
  --border: rgba(0, 245, 255, .12);
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Background overlays (pure CSS — no canvas needed) ──────────────────── */
.grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,245,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 30%, #030314 100%);
  pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.legal-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 46, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: .2em;
  color: var(--cyan);
  text-decoration: none;
  filter: drop-shadow(0 0 8px rgba(0,245,255,.4));
}

.legal-logo:hover { opacity: .85; }

/* ── Language switch ─────────────────────────────────────────────────────── */
.lang-switch {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.lang-switch a {
  font-family: 'Orbitron', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--muted);
  text-decoration: none;
  padding: .25rem .5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: color .2s, border-color .2s;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--cyan);
  border-color: rgba(0,245,255,.3);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.legal-layout {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
  gap: 3rem;
  align-items: flex-start;
}

/* ── Table of contents ───────────────────────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 2rem;
  width: 220px;
  flex-shrink: 0;
  font-size: .82rem;
}

.legal-toc-title {
  font-family: 'Orbitron', monospace;
  font-size: .65rem;
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.legal-toc li { margin-bottom: .4rem; }

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

.legal-toc a:hover { color: var(--cyan); }

/* ── Main article ────────────────────────────────────────────────────────── */
.legal-article {
  flex: 1;
  min-width: 0;
  max-width: 740px;
}

.legal-page-label {
  font-family: 'Orbitron', monospace;
  font-size: .65rem;
  letter-spacing: .18em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: .7;
}

.legal-article h1 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: .05em;
  margin-bottom: .75rem;
  line-height: 1.2;
}

.legal-meta {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-article h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .08em;
  margin: 2.25rem 0 .75rem;
  padding-top: .25rem;
}

.legal-article h3 {
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  margin: 1.5rem 0 .5rem;
}

.legal-article p {
  margin-bottom: 1rem;
  color: var(--text);
}

.legal-article ul,
.legal-article ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.legal-article li { margin-bottom: .35rem; }

.legal-article a {
  color: var(--cyan);
  text-decoration: none;
}

.legal-article a:hover { text-decoration: underline; }

.legal-article strong { color: #fff; font-weight: 600; }

.legal-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: .88rem;
}

.legal-article th,
.legal-article td {
  text-align: left;
  padding: .6rem .9rem;
  border: 1px solid var(--border);
}

.legal-article th {
  background: rgba(0,245,255,.05);
  color: var(--cyan);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .05em;
}

/* Callout box */
.legal-callout {
  background: rgba(0,245,255,.04);
  border: 1px solid rgba(0,245,255,.2);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .9rem;
}

.legal-callout strong { color: var(--cyan); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.legal-footer {
  position: relative;
  z-index: 10;
  background: rgba(10,10,46,.6);
  border-top: 1px solid var(--border);
  padding: 2rem;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  margin-bottom: 1rem;
}

.legal-footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.legal-footer-links a:hover,
.legal-footer-links a.active { color: var(--cyan); }

.legal-footer-contact {
  margin-top: .5rem;
}

.legal-footer-contact a {
  color: rgba(0,245,255,.5);
  text-decoration: none;
}

.legal-footer-contact a:hover { color: var(--cyan); }

.legal-footer-copy {
  margin-top: .75rem;
  font-family: 'Orbitron', monospace;
  font-size: .6rem;
  letter-spacing: .1em;
  opacity: .4;
}

/* ── Cookie settings page ────────────────────────────────────────────────── */
.cs-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  border: 1px solid;
}

.cs-status-badge.accepted {
  background: rgba(0,245,255,.07);
  border-color: rgba(0,245,255,.3);
  color: var(--cyan);
}

.cs-status-badge.rejected {
  background: rgba(255,45,120,.05);
  border-color: rgba(255,45,120,.25);
  color: var(--pink);
}

.cs-status-badge.pending {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.15);
  color: var(--muted);
}

.cs-category {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cs-category:last-of-type { border-bottom: none; }

.cs-cat-info { flex: 1; }

.cs-cat-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: .3rem;
  font-size: .95rem;
}

.cs-cat-desc {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.5;
}

.cs-always {
  font-size: .75rem;
  color: rgba(0,245,255,.6);
  font-weight: 600;
  white-space: nowrap;
  padding-top: .2rem;
}

/* Toggle switch */
.cs-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: .1rem;
}

.cs-toggle input { opacity: 0; width: 0; height: 0; }

.cs-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.1);
  border-radius: 24px;
  cursor: pointer;
  transition: .25s;
  border: 1px solid rgba(255,255,255,.15);
}

.cs-toggle input:checked + .cs-toggle-slider {
  background: var(--purple);
  border-color: var(--purple);
}

.cs-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: .25s;
}

.cs-toggle input:checked + .cs-toggle-slider::before {
  transform: translateX(20px);
}

.cs-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cs-btn {
  padding: .65rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: opacity .2s, transform .15s;
}

.cs-btn:hover { opacity: .85; transform: translateY(-1px); }

.cs-btn-primary {
  background: linear-gradient(135deg, #7b2fff, #00f5ff);
  color: #fff;
}

.cs-btn-secondary {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.12);
}

.cs-withdraw {
  margin-top: 1.5rem;
  font-size: .84rem;
  color: var(--muted);
}

.cs-withdraw a {
  color: var(--pink);
  text-decoration: none;
}

.cs-withdraw a:hover { text-decoration: underline; }

.cs-saved-notice {
  display: none;
  margin-top: 1rem;
  font-size: .84rem;
  color: var(--cyan);
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .legal-layout { flex-direction: column; gap: 2rem; padding: 1.5rem 1.25rem; }
  .legal-toc { position: static; width: 100%; }
  .legal-toc ol { display: flex; flex-wrap: wrap; gap: .35rem 1rem; border: none; padding: 0; }
  .legal-toc li { margin: 0; }
  .legal-header { padding: 1rem 1.25rem; }
  .legal-article h1 { font-size: 1.5rem; }
}
