.altcha-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 2.5em 1.25em;
}

.altcha-tagline {
  margin: 1em 0em;
}

.altcha-checkbox input {
  cursor: pointer;
}

/* Loading indicator shown until the solver script takes over */
.altcha-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75em;
  margin: 1.5em 0;
}

.altcha-loading-text {
  font-size: 0.875em;
  color: var(--muted-color, #999);
}

/* -------------------------- solver widget -------------------------- */

.altcha-box {
  width: 100%;
  max-width: 22em;
  margin: 0 auto;
  text-align: left;
}

.comment-form .altcha-box {
  max-width: 100%;
  margin: 1em 0 0;
}

.altcha-btn {
  display: flex;
  align-items: center;
  gap: 0.7em;
  width: 100%;
  padding: 0.8em 1em;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 0.55em;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.altcha-btn:hover:not(:disabled) {
  border-color: currentColor;
}

.altcha-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.altcha-btn:disabled {
  cursor: default;
}

.altcha-mark {
  position: relative;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  border: 2px solid currentColor;
  border-radius: 0.22em;
  opacity: 0.5;
}

.altcha-btn.is-busy .altcha-mark {
  border-radius: 50%;
  border-right-color: transparent;
  opacity: 0.8;
  animation: altcha-spin 0.7s linear infinite;
}

.altcha-btn.is-done .altcha-mark {
  border-color: #2f9e44;
  opacity: 1;
}

.altcha-btn.is-done .altcha-mark::after {
  content: "";
  position: absolute;
  left: 0.3em;
  top: 0.02em;
  width: 0.28em;
  height: 0.55em;
  border: solid #2f9e44;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.altcha-btn.is-error .altcha-mark {
  border-color: #e03131;
  opacity: 1;
}

@keyframes altcha-spin {
  to {
    transform: rotate(360deg);
  }
}

.altcha-bar {
  height: 3px;
  margin-top: 0.55em;
  border-radius: 2px;
  background: rgba(128, 128, 128, 0.22);
  overflow: hidden;
}

.altcha-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: currentColor;
  opacity: 0.55;
  transition: width 0.12s linear;
}
