.cu-banner,
.cu-reopen {
  --cu-bg: #fff;
  --cu-text: #171717;
  --cu-link: #171717;
  --cu-brand: #171717;
  --cu-brand-fg: #fff;
  --cu-radius: 10px;
  --cu-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--cu-font);
  color: var(--cu-text);
  box-sizing: border-box;
}

.cu-banner *,
.cu-reopen * {
  box-sizing: border-box;
}

.cu-banner {
  position: fixed;
  z-index: 99999;
  left: 16px;
  right: 16px;
  bottom: 16px;
  margin: 0 auto;
  max-width: 640px;
  background: var(--cu-bg);
  color: var(--cu-text);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 20px 22px 18px;
  animation: cu-in 180ms ease-out;
}

.cu-banner.is-hidden,
.cu-reopen.is-hidden {
  display: none;
}

.cu-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cu-msg {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.cu-muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.68;
}

.cu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cu-btn {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--cu-radius);
  background: transparent;
  color: var(--cu-text);
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.cu-btn:hover {
  opacity: 0.92;
}

.cu-btn:focus-visible {
  outline: 2px solid var(--cu-brand);
  outline-offset: 2px;
}

.cu-btn-primary {
  background: var(--cu-brand);
  color: var(--cu-brand-fg);
}

.cu-btn-equal {
  background: var(--cu-brand);
  color: var(--cu-brand-fg);
}

.cu-btn-ghost {
  border-color: currentColor;
  background: transparent;
}

.cu-btn-text {
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  font-weight: 500;
  padding-left: 8px;
  padding-right: 8px;
}

.cu-links {
  font-size: 12px;
}

.cu-links a,
.cu-banner a {
  color: var(--cu-link);
}

.cu-prefs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(50vh, 360px);
  overflow: auto;
}

.cu-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cu-row-head {
  appearance: none;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}

.cu-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cu-row-copy strong {
  font-size: 14px;
}

.cu-row-copy span {
  font-size: 12px;
  opacity: 0.7;
}

.cu-switch {
  appearance: none;
  width: 44px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #d4d4d4;
  position: relative;
  cursor: pointer;
  justify-self: end;
}

.cu-switch.is-on {
  background: var(--cu-brand);
}

.cu-switch.is-locked {
  opacity: 0.7;
  cursor: default;
}

.cu-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 150ms ease;
}

.cu-switch.is-on .cu-switch-knob {
  transform: translateX(18px);
}

.cu-cookielist {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cu-cookie {
  font-size: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
}

.cu-cookie strong {
  display: block;
  font-size: 12px;
}

.cu-cookie span {
  opacity: 0.65;
}

.cu-cookie p {
  margin: 4px 0 0;
}

.cu-reopen {
  position: fixed;
  z-index: 99998;
  left: 16px;
  bottom: 16px;
  border: 0;
  background: var(--cu-bg);
  color: var(--cu-text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-radius: var(--cu-radius);
  min-height: 40px;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

@keyframes cu-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .cu-banner {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding-bottom: 24px;
  }

  .cu-actions {
    flex-direction: column;
  }

  .cu-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cu-banner,
  .cu-switch-knob,
  .cu-btn {
    animation: none;
    transition: none;
  }
}
