/* ============================================================
   Important Legal Notice — site-wide compliance card
   Location: assets/css/legal-notice.css

   Rendered once via layouts/partials/legal-notice.php (included in
   layouts/footer.php above the <footer>), loaded site-wide from
   layouts/header.php. Kept out of main.css per the CSS strategy.

   Design: a compact, premium 2-column compliance card — visually
   lighter than page content, never an alarming banner. Auth pages
   (login / register / forgot / reset) get an even slimmer strip via
   `.auth-shell ~ .legal-notice` (no PHP changes needed). Fully
   token-driven, so light + dark are both intentional.
   ============================================================ */

.legal-notice {
  --ln-tint: rgba(99, 102, 241, 0.10);
  --ln-ring: rgba(99, 102, 241, 0.16);
  padding: 14px 0 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
[data-theme="dark"] .legal-notice {
  --ln-tint: rgba(139, 92, 246, 0.18);
  --ln-ring: rgba(139, 92, 246, 0.26);
}

/* `.container` supplies max-width + horizontal padding.
   2 columns on desktop: [ icon + title ] | [ summary + links ] */
.legal-notice__inner {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 10px 26px;
  align-items: start;
}

/* ---- Left column: shield + title + badge ---- */
.legal-notice__head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.legal-notice__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ln-tint);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--ln-ring);
}
.legal-notice__icon svg { width: 19px; height: 19px; }

.legal-notice__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--text);
}
.legal-notice__badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--ln-tint);
  border: 1px solid var(--ln-ring);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---- Right column: concise summary + policy links ---- */
.legal-notice__main { min-width: 0; }
.legal-notice__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.legal-notice__text strong { color: var(--text); font-weight: 700; }

.legal-notice__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.legal-notice__links a {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.legal-notice__links a:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px -8px rgba(99, 102, 241, 0.45);
}
.legal-notice__links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- Responsive: stack neatly on small screens ---- */
@media (max-width: 720px) {
  .legal-notice { padding: 12px 0 14px; }
  .legal-notice__inner { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 480px) {
  .legal-notice__links a { flex: 1 1 auto; justify-content: center; }
}

/* NOTE: Authentication pages (login, register, forgot/reset password,
   verify-email, verify-otp) suppress this component entirely via
   $hideLegalNotice in layouts/footer.php and instead show a small inline
   `.auth-terms` line under the form. So there is no auth-page variant here. */

@media (prefers-reduced-motion: reduce) {
  .legal-notice__links a { transition: none !important; }
}
