/* ==========================================================
   LEGAL-V2.CSS — Páginas legais (privacy/terms/sla/refund)
   ========================================================== */

/* ── LAYOUT GRID ────────────────────────────────────────── */
.legal-shell {
  padding-top: calc(7rem + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(3rem, 5vw, 4rem);
  position: relative;
  z-index: 5;
}

.legal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 0;
  align-items: flex-start;
}

.legal-main {
  min-width: 0;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.legal-sidebar {
  position: sticky;
  top: calc(7.5rem + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-self: flex-start;
}

.legal-sidebar__heading {
  font-family: var(--font-display);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 .5rem;
  padding-left: .5rem;
}

.legal-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.legal-sidebar__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all .2s;
}
.legal-sidebar__link:hover {
  color: var(--text);
  border-color: var(--red-border);
  background: var(--bg-card-hover);
}
.legal-sidebar__link.is-active {
  color: var(--red-bright);
  border-color: var(--red);
  background: linear-gradient(135deg, rgba(109, 74, 255,.12), rgba(109, 74, 255,.04));
  box-shadow: 0 0 0 1px rgba(109, 74, 255,.18), 0 4px 16px rgba(109, 74, 255,.12);
}

.legal-sidebar__link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--red-border);
  background: var(--red-soft);
  color: var(--red-bright);
}
.legal-sidebar__link.is-active .legal-sidebar__link-icon {
  background: rgba(109, 74, 255,.25);
  border-color: var(--red);
}

.legal-sidebar__link-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.legal-sidebar__link-title { font-size: .9rem; font-weight: 400; }
.legal-sidebar__hint { font-size: .7rem; color: var(--text-3); }

/* Sidebar card */
.legal-sidebar__card {
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--red-border);
  background: linear-gradient(160deg, rgba(109, 74, 255,.08), var(--bg-card) 70%);
}
.legal-sidebar__card-title {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text);
  margin: 0 0 .35rem;
}
.legal-sidebar__card-text {
  font-size: .8rem;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0 0 .85rem;
}
.legal-sidebar__card-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--red-bright);
  transition: color .2s;
}
.legal-sidebar__card-cta:hover { color: var(--text); }

/* ── DOC HERO ───────────────────────────────────────────── */
.legal-hero {
  padding: 1.75rem 2rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(109, 74, 255,.06) 0%, var(--bg-card) 50%);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-bright) 50%, var(--red-dark));
}

.legal-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .65rem;
  font-family: var(--font-display);
  font-size: .5rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red-bright);
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: 999px;
  margin-bottom: 1rem;
}

.legal-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 .6rem;
}
.legal-hero__title em { font-style: normal; color: var(--red-bright); }

.legal-hero__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 .75rem;
  max-width: 50rem;
}

.legal-hero__meta {
  font-size: .8rem;
  color: var(--text-3);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.legal-hero__meta::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3dd68c;
  box-shadow: 0 0 6px rgba(61,214,140,.6);
}

/* ── DOC CONTENT ────────────────────────────────────────── */
.legal-doc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-doc__intro {
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0;
}
.legal-doc__intro strong { color: var(--text); }

.legal-section {
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: border-color .22s;
}
.legal-section:hover { border-color: rgba(109, 74, 255,.18); }

.legal-section__title {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text);
  margin: 0 0 .85rem;
}
.legal-section__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 .5rem;
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 600;
  color: var(--red-bright);
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: 6px;
}

.legal-section p,
.legal-section ul,
.legal-section ol {
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 .85rem;
}
.legal-section p:last-child,
.legal-section ul:last-child,
.legal-section ol:last-child { margin-bottom: 0; }

.legal-section strong { color: var(--text); }
.legal-section a { color: var(--red-bright); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }

.legal-section ul,
.legal-section ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* ── HIGHLIGHT BOX ──────────────────────────────────────── */
.legal-highlight {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--red-border);
  background: var(--red-soft);
  font-size: .88rem;
  line-height: 1.55;
  color: var(--text);
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}
.legal-highlight::before {
  content: "ℹ";
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--red-bright);
  font-weight: 600;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 60rem) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .legal-sidebar {
    position: static;
    flex-direction: column;
  }
  .legal-sidebar__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
  }
}

@media (max-width: 44rem) {
  .legal-sidebar__nav { grid-template-columns: 1fr; }
  .legal-hero { padding: 1.4rem 1.4rem 1.2rem; }
  .legal-doc__intro,
  .legal-section { padding: 1.25rem 1.25rem; }
  .legal-section__title { font-size: .9rem; }
}

/* ===========================================================
   IDENTIFICAÇÃO DO OPERADOR (SILVS) — topo dos documentos legais
   =========================================================== */
.legal-identity {
  margin: 0 0 1.6rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--red-border, rgba(109,74,255,0.22));
  background: var(--red-soft, rgba(109,74,255,0.06));
}
.legal-identity__label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display, "DM Sans", sans-serif);
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--red-bright, #8b6cff);
  margin-bottom: 0.5rem;
}
.legal-identity__text {
  margin: 0;
  font-size: 0.9rem; line-height: 1.6; color: var(--text-2, #222225);
}
.legal-identity__text strong { color: var(--text, #222225); font-weight: 600; }

/* ===========================================================
   TABELA EM DOCUMENTOS LEGAIS (ex.: créditos de SLA)
   =========================================================== */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.25rem;
  font-size: 0.9rem;
  border: 1px solid var(--border, rgba(10,12,20,0.1));
  border-radius: 12px;
  overflow: hidden;
}
.legal-table thead th {
  text-align: left;
  font-family: var(--font-display, "DM Sans", sans-serif);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--red-bright, #8b6cff);
  background: var(--red-soft, rgba(109,74,255,0.06));
  padding: 0.7rem 1rem;
}
.legal-table td {
  padding: 0.7rem 1rem;
  color: var(--text-2, #222225);
  border-top: 1px solid var(--border, rgba(10,12,20,0.08));
}
.legal-table tbody tr:nth-child(even) td { background: rgba(10,12,20,0.02); }
.legal-table td:last-child, .legal-table th:last-child { text-align: right; white-space: nowrap; }
.legal-table td strong { color: var(--text, #222225); font-weight: 600; }
