#ab-cookie-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 999999;
  padding: 16px;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

#ab-cookie-banner *,
#ab-cookie-banner *::before,
#ab-cookie-banner *::after {
  box-sizing: border-box;
}

.ab-cookie-hidden {
  display: none !important;
}

.ab-cookie-box {
  max-width: 980px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 0 auto;
  padding: 20px;
  color: #202124;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 25%);
}

.ab-cookie-box h2 {
  margin: 0 0 10px;
  color: #171717;
  font-size: 20px;
  line-height: 1.3;
}

.ab-cookie-box h3 {
  margin: 0 0 6px;
  color: #171717;
  font-size: 16px;
  line-height: 1.3;
}

.ab-cookie-box p {
  margin: 0 0 10px;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.5;
}

.ab-cookie-box a {
  color: #075ec8;
  text-decoration: underline;
}

.ab-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ab-cookie-btn {
  min-height: 38px;
  padding: 10px 14px;
  color: #202124;
  background: #fff;
  border: 1px solid #202124;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ab-cookie-btn:hover {
  filter: brightness(.96);
}

.ab-cookie-btn:focus-visible,
.ab-cookie-switch input:focus-visible + span {
  outline: 3px solid rgb(0 102 204 / 30%);
  outline-offset: 2px;
}

.ab-cookie-btn-primary {
  color: #fff;
  background: #0066cc;
  border-color: #0066cc;
}

.ab-cookie-btn-link {
  color: #202124;
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

.ab-cookie-category {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #e8eaed;
}

.ab-cookie-category:first-of-type {
  border-top: 0;
}

.ab-cookie-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 52px;
  width: 52px;
  height: 28px;
  margin-top: 4px;
}

.ab-cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ab-cookie-switch input + span {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 30px;
  cursor: pointer;
  transition: background .2s;
}

.ab-cookie-switch input + span::before {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  content: "";
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}

.ab-cookie-switch input:checked + span {
  background: #0066cc;
}

.ab-cookie-switch input:checked + span::before {
  transform: translateX(24px);
}

.ab-cookie-switch-disabled input + span {
  cursor: not-allowed;
  opacity: .8;
}

.ab-cookie-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-dark-root .ab-cookie-box {
  color: #f1f3f4;
  background: #202124;
  border-color: #5f6368;
}

.site-dark-root .ab-cookie-box h2,
.site-dark-root .ab-cookie-box h3,
.site-dark-root .ab-cookie-box p,
.site-dark-root .ab-cookie-btn-link {
  color: #f1f3f4;
}

.site-dark-root .ab-cookie-box a {
  color: #8ab4f8;
}

.site-dark-root .ab-cookie-btn-secondary {
  color: #f1f3f4;
  background: #303134;
  border-color: #9aa0a6;
}

.site-dark-root .ab-cookie-category {
  border-color: #5f6368;
}

@media (max-width: 640px) {
  #ab-cookie-banner {
    padding: 10px;
  }

  .ab-cookie-box {
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 8px;
  }

  .ab-cookie-actions {
    flex-direction: column;
  }

  .ab-cookie-btn {
    width: 100%;
    text-align: center;
  }

  .ab-cookie-category {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-cookie-switch input + span,
  .ab-cookie-switch input + span::before {
    transition: none;
  }
}
