.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-secondary,
.cu-btn-ghost {
  border-color: currentColor;
  background: transparent;
  color: var(--cu-text);
}

.cu-banner.is-center {
  left: 16px;
  right: 16px;
  bottom: 16px;
  margin: 0 auto;
  max-width: 640px;
}

.cu-banner.is-left {
  left: 16px;
  right: auto;
  bottom: 16px;
  margin: 0;
  max-width: 420px;
}

.cu-banner.is-right {
  left: auto;
  right: 16px;
  bottom: 16px;
  margin: 0;
  max-width: 420px;
}

.cu-banner.is-full,
.cu-banner.is-bar {
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  border-radius: 0;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.cu-banner.is-full {
  padding: 16px 28px 14px;
}

.cu-banner.is-bar {
  padding: 8px 20px;
}

.cu-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cu-banner.is-full .cu-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 28px;
  row-gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
}

.cu-banner.is-full .cu-copy {
  grid-column: 1;
  grid-row: 1;
}

.cu-banner.is-full .cu-msg,
.cu-banner.is-bar .cu-msg {
  margin: 0;
  text-align: left;
}

.cu-banner.is-full .cu-muted {
  text-align: left;
}

.cu-banner.is-full .cu-actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin-left: 0;
  flex-wrap: nowrap;
}

.cu-banner.is-full .cu-links {
  grid-column: 1 / -1;
  grid-row: 2;
}

.cu-banner.is-full .cu-prefs {
  grid-column: 1 / -1;
  grid-row: 2;
}

.cu-banner.is-full.is-prefs .cu-links {
  grid-row: 4;
}

.cu-banner.is-full.is-prefs .cu-actions {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: start;
}

.cu-banner.is-bar .cu-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px 20px;
  max-width: none;
  margin: 0;
}

.cu-banner.is-bar .cu-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.cu-banner.is-bar .cu-msg {
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cu-banner.is-bar .cu-muted {
  display: none;
}

.cu-banner.is-bar .cu-actions {
  flex: 0 0 auto;
  margin-left: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

.cu-banner.is-bar .cu-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.cu-banner.is-bar .cu-btn-text {
  min-height: 34px;
  padding-left: 6px;
  padding-right: 6px;
}

.cu-banner.is-bar .cu-links {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cu-banner.is-prefs .cu-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.cu-banner.is-prefs .cu-actions {
  margin-left: 0;
  justify-self: start;
}

.cu-banner.is-prefs .cu-msg,
.cu-banner.is-prefs .cu-muted {
  white-space: normal;
}

.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-always {
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  font-size: 12px;
  font-weight: 600;
  color: #737373;
  white-space: nowrap;
}

.cu-row.is-locked .cu-row-copy strong {
  font-weight: 600;
}

.cu-prefs-hint {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: #737373;
  line-height: 1.4;
}

.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-cookie.is-necessary {
  background: #fafafa;
  box-shadow: none;
}

.cu-cookie.is-necessary .cu-cookie-meta {
  font-weight: 600;
  opacity: 0.72;
}

.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,
  .cu-banner.is-center,
  .cu-banner.is-left,
  .cu-banner.is-right,
  .cu-banner.is-full,
  .cu-banner.is-bar {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 18px 18px 24px;
  }

  .cu-banner.is-full .cu-inner,
  .cu-banner.is-bar .cu-inner,
  .cu-banner.is-full.is-prefs .cu-inner,
  .cu-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .cu-banner.is-full .cu-copy,
  .cu-banner.is-full .cu-actions,
  .cu-banner.is-full .cu-links,
  .cu-banner.is-full .cu-prefs,
  .cu-banner.is-bar .cu-copy,
  .cu-banner.is-bar .cu-actions,
  .cu-banner.is-bar .cu-links {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }

  .cu-banner.is-bar .cu-msg {
    white-space: normal;
  }

  .cu-banner.is-full .cu-actions,
  .cu-banner.is-bar .cu-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

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

@media (max-width: 1200px) and (min-width: 641px) {
  .cu-banner.is-bar .cu-inner {
    flex-wrap: wrap;
  }

  .cu-banner.is-bar .cu-copy {
    flex-basis: 100%;
  }

  .cu-banner.is-bar .cu-msg {
    white-space: normal;
  }
}

.cu-dns-footer {
  margin: 0;
  padding: 10px 16px 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}

.cu-dns-footer a,
.cu-dns-link {
  color: inherit;
  text-decoration: underline;
}

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