.consent-banner[hidden],
.consent-dialog:not([open]) {
  display: none;
}

.consent-banner {
  position: fixed;
  z-index: 1200;
  bottom: 24px;
  left: 24px;
  width: min(590px, calc(100% - 48px));
  padding: 18px 20px 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(18, 22, 29, 0.64), rgba(18, 22, 29, 0.36));
  color: #f7f6f2;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  animation: consent-reveal 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.consent-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 38%);
  pointer-events: none;
}

.consent-banner-copy,
.consent-banner-actions {
  position: relative;
}

.consent-banner-copy strong {
  display: block;
  margin-bottom: 5px;
  font: 600 14px/1.25 Arial, sans-serif;
  letter-spacing: -0.01em;
}

.consent-banner-copy p {
  max-width: 58ch;
  margin: 0;
  color: rgba(247, 246, 242, 0.7);
  font: 400 12px/1.48 Arial, sans-serif;
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 14px;
}

.consent-banner button {
  min-height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(247, 246, 242, 0.78);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease, background 180ms ease;
}

.consent-banner button:not(.is-primary)::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: 4px;
  background: currentColor;
  transition: width 180ms ease;
}

.consent-banner button:not(.is-primary):hover,
.consent-banner button:not(.is-primary):focus-visible {
  color: #fff;
}

.consent-banner button:not(.is-primary):hover::after,
.consent-banner button:not(.is-primary):focus-visible::after {
  width: 100%;
}

.consent-banner button.is-primary {
  min-height: 34px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(10px);
}

.consent-banner button.is-primary:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.consent-banner button:focus-visible,
.consent-dialog button:focus-visible,
.consent-dialog input:focus-visible,
.consent-dialog a:focus-visible {
  outline: 3px solid #b9c5ff;
  outline-offset: 3px;
}

.consent-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  border: 0;
  padding: 0;
  background: rgba(231, 234, 241, 0.96);
  color: #16191e;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px);
}

.consent-dialog::backdrop {
  background: rgba(9, 12, 16, 0.64);
  backdrop-filter: blur(8px);
}

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

.consent-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(89, 97, 109, 0.3);
}

.consent-dialog header span {
  color: #59616d;
  font: 700 10px/1.2 Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.consent-dialog h2 {
  margin: 7px 0 0;
  font: 400 36px/1 Georgia, serif;
  letter-spacing: -0.035em;
}

.consent-dialog button {
  min-height: 40px;
  border: 0;
  padding: 0 14px;
  background: rgba(22, 25, 30, 0.08);
  color: #16191e;
  font: 700 11px/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.consent-dialog button:hover {
  background: rgba(22, 25, 30, 0.14);
}

.consent-dialog .consent-dialog-close {
  min-width: 40px;
  padding: 0;
  background: transparent;
  font-size: 22px;
  letter-spacing: 0;
}

.consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(89, 97, 109, 0.22);
}

.consent-category strong {
  display: block;
  margin-bottom: 5px;
  font: 700 13px/1.3 Arial, sans-serif;
}

.consent-category p {
  margin: 0;
  color: #59616d;
  font: 400 12px/1.45 Arial, sans-serif;
}

.consent-category input {
  width: 21px;
  height: 21px;
  accent-color: #16191e;
}

.consent-always {
  color: #59616d;
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.consent-dialog-policy {
  margin: 17px 0;
  color: #59616d;
  font: 400 12px/1.4 Arial, sans-serif;
}

.consent-dialog-policy a {
  color: inherit;
  text-underline-offset: 3px;
}

.consent-dialog footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.consent-dialog footer button.is-primary {
  background: #16191e;
  color: #fff;
}

[data-site-agent][data-consent-gated] {
  display: none !important;
}

@keyframes consent-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .consent-banner {
    right: 12px;
    bottom: 72px;
    left: 12px;
    width: auto;
    padding: 16px;
  }

  .consent-banner-actions {
    gap: 8px;
  }

  .consent-banner button {
    font-size: 8.5px;
    letter-spacing: 0.03em;
  }

  .consent-banner button.is-primary {
    padding-right: 7px;
    padding-left: 7px;
  }

  .consent-dialog-panel {
    padding: 22px 18px;
  }

  .consent-dialog h2 {
    font-size: 31px;
  }

  .consent-dialog footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .consent-dialog footer button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner {
    animation: none;
  }

  .consent-banner button,
  .consent-banner button::after,
  .consent-dialog button {
    transition: none;
  }
}
