/* Cookie consent banner */
.rb-cookie {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 100;
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: rb-cookie-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rb-cookie[hidden],
.rb-cookie [hidden] {
  display: none;
}
.rb-cookie:focus {
  outline: none;
}
@keyframes rb-cookie-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.rb-cookie-title {
  margin: 0 0 8px;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.rb-cookie-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.rb-cookie-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Preferences */
.rb-cookie-prefs {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.rb-cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.rb-cookie-row-text strong {
  display: block;
  font-size: 14.5px;
}
.rb-cookie-row-text span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.rb-cookie-switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.18s ease;
}
.rb-cookie-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease;
}
.rb-cookie-switch:checked {
  background: var(--primary);
}
.rb-cookie-switch:checked::after {
  transform: translateX(20px);
}
.rb-cookie-switch:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.rb-cookie-switch:focus-visible,
.rb-cookie-link:focus-visible,
.rb-cookie-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Actions */
.rb-cookie-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.rb-cookie-link {
  margin-right: auto;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rb-cookie-link:hover {
  color: var(--primary);
}
.rb-cookie-btn {
  justify-content: center;
  padding: 11px 18px;
  font-size: 14px;
}
.rb-cookie-btn-dark {
  background: var(--ink);
  color: #fff;
}
.rb-cookie-btn-dark:hover {
  background: var(--ink-2);
  color: #fff;
}

@media (max-width: 720px) {
  .rb-cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
    padding: 20px;
  }
  .rb-cookie-link {
    width: 100%;
    text-align: left;
  }
  .rb-cookie-btn {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rb-cookie {
    animation: none;
  }
}
