.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100000;
  max-width: 360px;
  font-family: var(--font-primary);
  background: #1c213a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 16px 16px 14px;
  display: none;
}

.cookie-close img {
  width: 16px;
  height: 16px;
  display: block;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner h3 {
  font-size: 16px;
  margin-bottom: 6px;
  margin-top: unset;
}

.cookie-banner p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.cookie-banner a {
  font-size: 14px;
  color: var(--accent-3);
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.cookie-banner a:hover {
  color: var(--accent-2);
  transform: scale(1.01);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.cookie-actions .button {
  min-width: 0;
  padding: 8px 12px;
  font-family: inherit;
  width: stretch;
}

/* Form controls (buttons) don't reliably inherit font styles across browsers */
.cookie-banner button,
.cookie-manage-card button {
  font-family: inherit;
}

.cookie-manage-panel {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  place-items: center;
  padding: 24px;
}

.cookie-manage-panel[data-open="true"] {
  display: grid;
}

.cookie-manage-card {
  width: min(580px, 92vw);
  background: #1c213a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 26px;
  position: relative;
  display: grid;
  gap: 14px;
  font-family: var(--font-primary);
}

.cookie-manage-card h3 {
  text-align: center;
  font-size: 22px;
  margin: unset;
}

/* Only the intro paragraph under the modal title should be centered */
.cookie-manage-card>p {
  font-size: 14px;
  color: #AFB1BE;
  text-align: center;
  margin: unset;
}

.cookie-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff14;
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 0;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
}

.cookie-close:hover {
  background-color: #ffffff3d;
}

.cookie-manage-card h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.cookie-manage-card>p a {
  color: var(--accent-3);
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.cookie-manage-card>p a:hover {
  color: var(--accent-2);
  transform: scale(1.01);
}

.cookie-pref {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgb(255 255 255 / 3%);
  ;
  border-radius: 6px;
  padding: 20px;
}

.cookie-pref p {
  text-align: left;
  margin: unset;
  font-size: 14px;
  line-height: 1.6;
  color: #AFB1BE;
}

.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  font-family: inherit;
}

.cookie-toggle span {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #3a3f5c;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.cookie-toggle span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked+span {
  background: var(--accent-3);
}

.cookie-toggle input:checked+span::after {
  transform: translateX(20px);
}

.cookie-manage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
