.ics-captcha {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.ics-captcha > label {
  flex: 0 0 auto;
  margin: 0;
}

.ics-captcha__row {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 196px;
}

.ics-captcha__challenge {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 4px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 104px;
  height: 38px;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 104px;
}

.ics-captcha .ics-captcha__challenge,
.ics-captcha .ics-captcha__challenge:hover,
.ics-captcha .ics-captcha__challenge:focus,
.ics-captcha .ics-captcha__challenge:active {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.ics-captcha__challenge:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
  outline: 0;
}

.ics-captcha__challenge img {
  display: block;
  height: 100%;
  inset: 0;
  max-width: none;
  object-fit: fill;
  position: absolute;
  width: 100%;
}

.ics-captcha__retry {
  align-items: center;
  background: #f6f8fb;
  color: #2271b1;
  display: none;
  font-size: 12px;
  font-weight: 600;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 2;
}

.ics-captcha.is-error .ics-captcha__retry {
  display: flex;
}

.ics-captcha.is-loading .ics-captcha__challenge::after {
  animation: ics-captcha-loading 1s linear infinite;
  background: linear-gradient(100deg, transparent 20%, rgba(34, 113, 177, .18) 48%, transparent 76%);
  content: '';
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}

.ics-captcha__answer {
  box-sizing: border-box;
  flex: 0 0 82px;
  height: 38px !important;
  letter-spacing: .3em;
  max-width: 82px !important;
  min-width: 82px;
  padding-left: 12px !important;
  padding-right: 7px !important;
  text-align: center;
  width: 82px !important;
}

.ics-captcha__status {
  color: #b32d2e;
  display: block;
  flex: 0 0 100%;
  font-size: 12px;
  line-height: 1.25;
  min-height: 0;
}

.ics-captcha__status:empty {
  display: none;
}

.ics-captcha__status.is-progress {
  color: #246b45;
}

.ics-captcha noscript {
  color: #b32d2e;
  flex-basis: 100%;
}

#login .ics-captcha {
  align-items: flex-start;
}

#login .ics-captcha__answer {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

@keyframes ics-captcha-loading {
  to { transform: translateX(100%); }
}

@media (max-width: 420px) {
  .ics-captcha { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .ics-captcha.is-loading .ics-captcha__challenge::after { animation: none; }
}
