/* -------------------- Privacy Policy (Plain Legal Style) -------------------- */

body.page-legal {
  color: #0f172a;
  background: #fff;
}

.legal-document {
  width: min(100% - 2rem, 900px);
  margin: 0 auto;
  padding-block: var(--section-spacing);
  line-height: 1.7;
}

.legal-document h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.2;
  color: var(--brand);
}

.legal-document h2 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.25;
  color: var(--brand);
}

.legal-document h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--brand);
}

.legal-document p {
  margin: 0 0 1rem;
  color: #1f2937;
}

.legal-document ul,
.legal-document ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: #1f2937;
}

.legal-document li {
  margin-bottom: 0.35rem;
}

.legal-document a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 55%, transparent);
  text-underline-offset: 0.15em;
}

.legal-document a:hover {
  text-decoration-color: var(--brand);
}

.legal-meta {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* -------------------- Cookie Consent -------------------- */

.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--brand);
  color: #fff;
  z-index: 120;
  box-shadow: 0 -12px 30px rgba(2, 8, 23, 0.35);
  padding: 1rem 0;
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner__inner {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.cookie-banner__title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}
.cookie-banner__content p {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.85);
}
.cookie-banner__content a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
@media (min-width: 900px) {
  .cookie-banner__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .cookie-banner__actions {
    justify-content: flex-end;
  }
}

.cookie-button {
  appearance: none;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: translate 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, color 0.2s ease;
}
.cookie-button:focus-visible {
  outline: 3px solid #74c0fc;
  outline-offset: 2px;
}
.cookie-banner .cookie-button {
  background: #fff;
  color: var(--brand);
  border-color: rgba(255, 255, 255, 0.75);
}
.cookie-banner .cookie-button--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.cookie-banner .cookie-button--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.cookie-button:hover {
  translate: 0 -1px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.cookie-settings {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: calc(1.5rem + env(safe-area-inset-top)) 1.5rem
    calc(1.5rem + env(safe-area-inset-bottom));
}
.cookie-settings[hidden] {
  display: none;
}
.cookie-settings__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}
.cookie-settings__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  background: #fff;
  color: #0f172a;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  max-height: calc(100svh - 3rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cookie-settings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.cookie-settings__header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--brand);
}
.cookie-settings__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #1f2937;
}
.cookie-settings__section {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
.cookie-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  background: #f8fafc;
}
.cookie-setting--fixed {
  background: #f1f5f9;
}
.cookie-setting p {
  margin: 0.25rem 0 0;
  color: #475569;
  font-size: 0.9rem;
}
.cookie-setting__label {
  font-weight: 600;
}
.cookie-setting__status {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.cookie-setting .cookie-switch {
  align-self: center;
}
@media (max-width: 600px) {
  .cookie-setting {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-setting__status {
    margin-top: 0.35rem;
  }
  .cookie-setting .cookie-switch {
    align-self: flex-start;
    margin-top: 0.4rem;
  }
}
.cookie-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}
.cookie-settings .cookie-button {
  background: var(--brand);
  color: #fff;
  border-color: rgba(25, 41, 69, 0.2);
}
.cookie-settings .cookie-button--outline {
  background: transparent;
  color: var(--brand);
  border-color: rgba(25, 41, 69, 0.25);
}

.cookie-switch {
  position: relative;
  width: 52px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-switch__slider {
  position: absolute;
  inset: 0;
  background: #cbd5f5;
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}
.cookie-switch__slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.cookie-switch input:checked + .cookie-switch__slider {
  background: var(--brand);
}
.cookie-switch input:checked + .cookie-switch__slider::before {
  transform: translateX(24px);
}
.cookie-switch input:focus-visible + .cookie-switch__slider {
  outline: 2px solid #74c0fc;
  outline-offset: 2px;
}

body.cookie-settings-open {
  overflow: hidden;
}
