/* ================================
   CONSENT / COOKIE SETTINGS
================================ */

.consent-banner {
  position: fixed;
  right: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 1200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 22px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.consent-banner__copy {
  max-width: 720px;
}

.consent-banner h2,
.consent-dialog h2 {
  margin: 4px 0 8px;
}

.consent-banner p,
.consent-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.consent-kicker {
  color: var(--olive);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.consent-actions,
.consent-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.consent-actions {
  flex-wrap: wrap;
  max-width: 500px;
}

.consent-link-button,
.footer-cookie-button {
  padding: 7px 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-cookie-button {
  color: var(--footer-text);
  text-align: left;
}

.consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 22px;
}

.consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 15, 0.66);
  backdrop-filter: blur(5px);
}

.consent-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  outline: none;
}

.consent-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.consent-category div {
  display: grid;
  gap: 4px;
}

.consent-category small,
.consent-status {
  color: var(--muted);
}

.consent-status {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
}

.consent-category--toggle {
  cursor: pointer;
}

.consent-category--toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent-switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background var(--transition);
}

.consent-switch::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-small);
  content: "";
  transition: transform var(--transition);
}

.consent-category--toggle input:checked + .consent-switch {
  background: var(--olive);
}

.consent-category--toggle input:checked + .consent-switch::after {
  transform: translateX(22px);
}

.consent-category--toggle input:focus-visible + .consent-switch {
  outline: 3px solid color-mix(in srgb, var(--gold) 45%, transparent);
  outline-offset: 3px;
}

.consent-dialog__actions {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .consent-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    padding: 18px;
  }

  .consent-actions,
  .consent-dialog__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .consent-actions .btn,
  .consent-dialog__actions .btn {
    width: 100%;
  }

  .consent-dialog {
    padding: 26px 20px 20px;
  }
}
