/* Cookie consent: bar and preferences dialog */
.consent-bar {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 10000;
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--black-magic);
  color: var(--white);
  border-radius: 16px;
  box-shadow: 0 16px 40px var(--black-a40);
}

.consent-copy h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.consent-copy p {
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 62ch;
}

.consent-copy a,
.consent-panel a {
  color: inherit;
  text-underline-offset: 3px;
}

.consent-copy a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.consent-panel a:focus-visible { outline: 3px solid var(--purple-blast); outline-offset: 3px; }

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  flex: none;
}

.consent-btn {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  border: 2px solid var(--white);
  background: var(--white);
  color: var(--black-magic);
  cursor: pointer;
  transition-property: background-color, color;
  transition-duration: 0.2s;
}

.consent-btn:hover { background: var(--gold); border-color: var(--gold); }
.consent-btn:active { opacity: 0.85; }
.consent-btn:focus-visible,
.consent-close:focus-visible,
.consent-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.consent-link {
  background: transparent;
  color: var(--white);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-link:hover { background: transparent; color: var(--gold); border-color: transparent; }

/* Preferences dialog */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--black-a85);
}

.consent-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 2rem;
  background: var(--white);
  color: var(--deep-gray);
  border-radius: 20px;
}

.consent-panel h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--purple-blast);
  margin-bottom: 0.75rem;
}

.consent-panel > p { line-height: 1.55; margin-bottom: 1.25rem; }

.consent-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--deep-gray);
  cursor: pointer;
}

.consent-rows { display: grid; gap: 1rem; margin-bottom: 1.5rem; }

.consent-row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.consent-row label { font-weight: 700; }
.consent-row p { font-size: 0.9rem; line-height: 1.5; margin-top: 0.25rem; }
.consent-row input { width: 22px; height: 22px; flex: none; margin-top: 0.15rem; accent-color: var(--purple-blast); }

.consent-panel .consent-btn { border-color: var(--purple-blast); background: transparent; color: var(--purple-blast); }
.consent-panel .consent-btn:hover { background: var(--purple-blast); color: var(--white); }

body.consent-open { overflow: hidden; }

@media (max-width: 760px) {
  .consent-bar { flex-direction: column; align-items: stretch; }
  .consent-actions .consent-btn { flex: 1 1 auto; }
}
