.consent-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, .18);
  background: #14161a;
  color: #ffffff;
  box-shadow: 0 -12px 36px rgba(20, 22, 26, .16);
}

.consent-banner[hidden] { display: none; }

.consent-banner__inner {
  width: min(1200px, calc(100% - 48px));
  min-height: 112px;
  margin-inline: auto;
  padding: 22px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.consent-banner h2 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.2;
}

.consent-banner p {
  max-width: 720px;
  margin: 0;
  color: #d8dadd;
  font-size: 12px;
  line-height: 1.55;
}

.consent-banner a { color: #ffffff; }

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.consent-button {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.consent-button:hover { background: rgba(255, 255, 255, .1); }

.consent-button:focus-visible,
.consent-preferences:focus-visible {
  outline: 3px solid #7892ff;
  outline-offset: 3px;
}

.consent-button--choice {
  min-width: 112px;
  background: #ffffff;
  color: #14161a;
}

.consent-button--choice:hover { background: #f0f0ec; }

.consent-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid #d7d7d0;
  border-radius: 7px;
  background: #f7f6f1;
  color: #14161a;
  box-shadow: 0 24px 80px rgba(20, 22, 26, .24);
}

.consent-dialog::backdrop { background: rgba(20, 22, 26, .62); }

.consent-dialog__body { padding: 28px; }

.consent-dialog h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.08;
}

.consent-dialog__intro {
  margin: 12px 0 24px;
  color: #5d646c;
  font-size: 13px;
  line-height: 1.6;
}

.consent-setting {
  min-height: 76px;
  padding: 16px 0;
  border-top: 1px solid #e0dfd6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.consent-setting strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.consent-setting span {
  display: block;
  color: #5d646c;
  font-size: 11.5px;
  line-height: 1.5;
}

.consent-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.consent-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent-toggle i {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid #8a9096;
  border-radius: 999px;
  background: #ffffff;
  transition: background 160ms ease, border-color 160ms ease;
}

.consent-toggle i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5d646c;
  transition: transform 160ms ease, background 160ms ease;
}

.consent-toggle input:checked + i {
  border-color: #5366d6;
  background: #7892ff;
}

.consent-toggle input:checked + i::after {
  background: #14161a;
  transform: translateX(20px);
}

.consent-toggle input:focus-visible + i {
  outline: 3px solid #5366d6;
  outline-offset: 3px;
}

.consent-toggle input:disabled + i { opacity: .58; }

.consent-dialog__actions {
  padding-top: 20px;
  border-top: 1px solid #e0dfd6;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.consent-dialog .consent-button {
  border-color: #14161a;
  color: #14161a;
}

.consent-dialog .consent-button--save {
  background: #14161a;
  color: #ffffff;
}

.consent-preferences {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .consent-banner__inner {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .consent-actions [data-consent-manage] { grid-column: 1 / -1; }
  .consent-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-toggle i,
  .consent-toggle i::after { transition: none; }
}
