/* hCaptcha mark tucked into the bottom-right corner once a visitor starts filling
   in a protected form. Hover or focus slides out the required attribution. */
.hcaptcha-badge {
  position: fixed;
  right: 0;
  bottom: 1rem;
  z-index: 190;
  box-sizing: border-box;
  display: flex;
  flex-direction: row-reverse; /* logo stays in the corner; text slides out to its left */
  align-items: center;
  gap: 0.625rem;
  max-width: 3.5rem;
  padding: 0.5rem;
  overflow: hidden;
  background: #fff;
  color: #555;
  border-radius: 10px 0 0 10px;
  box-shadow: 0 2px 10px oklch(0% 0 0 / 0.18);
  font: 500 0.6875rem/1.35 system-ui, sans-serif;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 200ms, transform 200ms, max-width 250ms ease;
}

.hcaptcha-badge--visible {
  opacity: 1;
  transform: none;
}

.hcaptcha-badge:hover,
.hcaptcha-badge:focus-within {
  max-width: 16rem;
}

.hcaptcha-badge:focus-visible {
  outline: 2px solid #0074bf;
  outline-offset: 2px;
}

.hcaptcha-badge__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.hcaptcha-badge__text {
  margin: 0 0 0 0.25rem;
  opacity: 0;
  transition: opacity 150ms;
}

.hcaptcha-badge:hover .hcaptcha-badge__text,
.hcaptcha-badge:focus-within .hcaptcha-badge__text {
  opacity: 1;
}

.hcaptcha-badge__text a {
  color: inherit;
  text-decoration: underline;
}

/* The invisible widget's iframe needs no space in the badge. */
.hcaptcha-badge__widget {
  position: absolute;
  width: 0;
  height: 0;
}

/* Sit above the accessibility button where the layout has one. */
body:has(.a11y-widget) .hcaptcha-badge {
  bottom: calc(1.5rem + 48px + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  .hcaptcha-badge,
  .hcaptcha-badge__text { transition: none; }
}

@media print {
  .hcaptcha-badge { display: none; }
}
