.cookie-settings {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  padding: 0.375rem 0.625rem;
  color: #52525b;
  background: rgb(var(--color-code-block-light));
  border: 1px solid #d4d4d8;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.cookie-settings:hover {
  color: #27272a;
  border-color: #a1a1aa;
}

.cookie-settings:focus-visible {
  outline: 2px solid #0969da;
  outline-offset: 2px;
}

:root.dark .cookie-settings {
  color: #d4d4d8;
  background: rgb(var(--color-code-block-dark));
  border-color: #52525b;
  box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
}

:root.dark .cookie-settings:hover {
  color: #fff;
  border-color: #a1a1aa;
}

.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 36rem;
  padding: 0.875rem 1rem;
  color: #27272a;
  background: rgb(var(--color-code-block-light));
  border: 1px solid #e4e4e7;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  font-size: 0.875rem;
  line-height: 1.4;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner__actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-banner__button {
  padding: 0.5rem 0.75rem;
  color: #fff;
  background: #0969da;
  border: 1px solid #0969da;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-banner__button:hover {
  background: #0550ae;
  border-color: #0550ae;
}

.cookie-banner__button--secondary {
  color: inherit;
  background: transparent;
  border-color: #a1a1aa;
}

.cookie-banner__button--secondary:hover {
  background: #f4f4f5;
  border-color: #71717a;
}

.cookie-banner__button:focus-visible {
  outline: 2px solid #0969da;
  outline-offset: 2px;
}

:root.dark .cookie-banner {
  color: #f4f4f5;
  background: rgb(var(--color-code-block-dark));
  border-color: #52525b;
  box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
}

:root.dark .cookie-banner__button--secondary:hover {
  background: #3f3f46;
  border-color: #a1a1aa;
}

:root.dark .cookie-banner__button:focus-visible,
:root.dark .cookie-settings:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px #0969da;
}

@media (max-width: 40rem) {
  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    max-width: none;
  }

  .cookie-banner__actions {
    justify-content: flex-end;
  }
}
