/* Cookie consent: the bottom bar and the preferences dialog.
   Shaped like live's (fixed to the bottom, white, three buttons) but built from the DPL tokens in
   CLAUDE.md — 20px radius, 44px buttons, 13px uppercase labels, no weight above 500. */

.dpl-consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  /* Above the floating contact buttons, which are fixed to the same corner at z-index 9000 — they
     were covering this bar's own buttons. Still below the age gate, which is the more important
     modal and covers everything on a first visit. */
  z-index: 9100;
  background: #fff;
  border-top: 1px solid #E5E5E5;
  box-shadow: 0 -4px 24px rgba(13, 13, 13, 0.06);
}

.dpl-consent__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dpl-consent__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: #0D0D0D;
}

.dpl-consent__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6B6B6B;
}

.dpl-consent__body a {
  color: #0D0D0D;
  text-decoration: underline;
}

.dpl-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dpl-consent__btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 20px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: none;
  white-space: nowrap;
}

.dpl-consent__btn--solid { background: #FF9A01; color: #0D0D0D; }
.dpl-consent__btn--ghost { border-color: #E5E5E5; color: #0D0D0D; background: #fff; }
.dpl-consent__btn--plain { color: #6B6B6B; text-decoration: underline; text-transform: none; letter-spacing: 0; padding: 0 8px; }

.dpl-consent__btn--solid:hover { filter: brightness(0.96); }
.dpl-consent__btn--ghost:hover { background: #F7F7F7; }

@media screen and (min-width: 768px) {
  .dpl-consent__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
  }
  .dpl-consent__text { max-width: 62ch; }
  .dpl-consent__actions { flex-wrap: nowrap; }
}

/* --- preferences ------------------------------------------------------- */

/* And move the buttons themselves up out of the way while the bar is there. The height comes from
   cookie-consent.js, measured rather than guessed, because the text wraps differently per language
   and per width. */
.dpl-consent-open .dpl-fab {
  bottom: calc(24px + var(--dpl-consent-height, 0px));
}

.dpl-consent-prefs {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(13, 13, 13, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dpl-consent-prefs[aria-hidden='true'] { display: none; }

.dpl-consent-prefs__modal {
  background: #fff;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
}

.dpl-consent-prefs__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dpl-consent-prefs__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #0D0D0D;
}

.dpl-consent-prefs__close {
  border: 0;
  background: none;
  cursor: pointer;
  color: #6B6B6B;
  padding: 4px;
  line-height: 0;
}

.dpl-consent-prefs__intro-title {
  margin: 20px 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: #0D0D0D;
}

.dpl-consent-prefs__intro {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #6B6B6B;
}

.dpl-consent-prefs__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dpl-consent-prefs__item {
  border-top: 1px solid #E5E5E5;
  padding: 16px 0;
}

.dpl-consent-prefs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dpl-consent-prefs__name {
  font-size: 14px;
  font-weight: 500;
  color: #0D0D0D;
}

.dpl-consent-prefs__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6B6B6B;
}

/* A switch, built from a real checkbox so it works with a keyboard and a screen reader. */
.dpl-consent-prefs__switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.dpl-consent-prefs__switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.dpl-consent-prefs__track {
  width: 44px;
  height: 26px;
  border-radius: 20px;
  background: #E5E5E5;
  position: relative;
  transition: background 0.15s ease;
}

.dpl-consent-prefs__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.dpl-consent-prefs__switch input:checked + .dpl-consent-prefs__track { background: #FF9A01; }
.dpl-consent-prefs__switch input:checked + .dpl-consent-prefs__track::after { transform: translateX(18px); }
.dpl-consent-prefs__switch input:disabled + .dpl-consent-prefs__track { opacity: 0.5; cursor: not-allowed; }
.dpl-consent-prefs__switch input:focus-visible + .dpl-consent-prefs__track { outline: 2px solid #0D0D0D; outline-offset: 2px; }

.dpl-consent-prefs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid #E5E5E5;
  padding-top: 20px;
  margin-top: 4px;
}

/* The footer's "Cookie preferences" entry is a button so it can open the dialog, but it has to look
   like the links beside it. */
.dpl-footer__linkbtn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.dpl-footer__linkbtn:hover { text-decoration: underline; }
