/* backend>static>dogs>css>terms.css */
*, *::before, *::after { box-sizing: border-box; }

/* Anti zoom automatico iOS su testo (evita “salti” di dimensione) */
html { -webkit-text-size-adjust: 100%; }

/* --- Legal pages: layout leggibile su fondo chiaro --- */
.legal-page { overflow-x: hidden; } /* niente scroll orizzontale */

.legal-doc{
  max-width: 860px;
  margin: 32px auto;
  padding: 0 16px;
  color: #111;
  line-height: 1.65;
}

/* Titoli */
.legal-doc h1{
  margin: 0 0 10px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #111;
}
.legal-doc h2{
  margin: 24px 0 8px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
}

/* Testo secondario */
.legal-doc .muted{
  color: #6b7280;
  font-size: .95rem;
}

/* Paragrafi e liste */
.legal-doc p{ margin: 10px 0; }
.legal-doc ul, .legal-doc ol{ margin: 8px 0 12px 20px; }
.legal-doc li{ margin: 6px 0; }

/* Link */
.legal-doc a{
  color: #2563eb;
  text-decoration: underline;
}
.legal-doc a:hover{ opacity: .85; }

/* Media + elementi larghi */
.legal-doc img,
.legal-doc video{
  display: block;          /* evita spazi “misteriosi” inline */
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Separatori */
.legal-doc hr{
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 18px 0;
}

/* Tabelle (es. Cookie policy) */
.legal-doc table{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;      /* forza wrap delle celle */
  margin: 12px 0;
}
.legal-doc th,
.legal-doc td{
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
  word-break: break-word;   /* evita overflow parole lunghissime/URL */
  white-space: normal;
}
.legal-doc thead th{
  background: #f3f4f6;
  color: #111;
  font-weight: 600;
}

/* Footer leggibile su pagine bianche (attivato da body_class: light-footer) */
.legal-page.light-footer .site-footer{
  color:#111;
  background: transparent;
  border-top: none;
}
.legal-page.light-footer .site-footer__links a{ color:#111; }
.legal-page.light-footer .site-footer__legal{ color:#6b7280; }

/* Mobile: padding coerente e niente larghezze “furbe” */
@media (max-width: 600px){
  .legal-doc{ padding: 0 14px; }
  /* Facoltativo: riduci un pelo H1 su schermi piccoli */
  .legal-doc h1{ font-size: 1.6rem; }
}
/* Pulsante uscita (in alto a destra) */
.legal-doc{ position: relative; }

.legal-exit-btn{
  position: absolute;
  top: 12px;
  right: 12px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 8px;

  color: #000;
  text-decoration: none;
  background: transparent;
  border: 0px solid rgba(0,0,0,.18);
}

.legal-exit-brand{
  font-weight: 900;
  line-height: 1.05;
  font-size: 14px;
  color: #000;
}

.legal-exit-arrow{
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: #000;
}

.legal-exit-btn:hover{
  background: rgba(0,0,0,.04);
}
/* =========================
   DARK MODE (da dogs.html)
   ========================= */

html.dark .legal-page {
  background: #0b0b0b;
}

html.dark .legal-doc {
  color: #e5e7eb;
}

html.dark .legal-doc h1,
html.dark .legal-doc h2 {
  color: #f9fafb;
}

html.dark .legal-doc .muted {
  color: #9ca3af;
}

html.dark .legal-doc a {
 color: #2563eb;
}

html.dark .legal-doc hr {
  border-top-color: #1f2933;
}

/* Tabelle */
html.dark .legal-doc table {
  border-color: #1f2933;
}
html.dark .legal-doc th,
html.dark .legal-doc td {
  border-color: #1f2933;
}
html.dark .legal-doc thead th {
  background: #111827;
  color: #f9fafb;
}

/* Exit button */
html.dark .legal-exit-btn,
html.dark .legal-exit-brand,
html.dark .legal-exit-arrow {
  color: #f9fafb;
}

html.dark .legal-exit-btn:hover {
  background: rgba(255,255,255,.06);
}

/* Footer in dark */
html.dark .legal-page.light-footer .site-footer {
  color: #9ca3af;
}
html.dark .legal-page.light-footer .site-footer__links a {
  color: #e5e7eb;
}
