.slider-captcha {
  --slider-primary: #7366ff;
  --slider-success: #2eaf67;
  --slider-error: #df4758;
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
  color: #303747;
  font-family: inherit;
  text-align: left;
  user-select: none;
}

.slider-captcha *,
.slider-captcha *::before,
.slider-captcha *::after {
  box-sizing: border-box;
}

.slider-captcha__header {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.slider-captcha__reset {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #697287;
  background: #f0f2f7;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.slider-captcha__reset span {
  font-size: 19px;
  line-height: 1;
}

.slider-captcha__reset:hover,
.slider-captcha__reset:focus-visible {
  color: var(--slider-primary);
  transform: rotate(28deg);
}

.slider-captcha__preview {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: var(--slider-aspect-ratio);
  overflow: hidden;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  background-color: #eef0f5;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slider-captcha__piece {
  position: absolute;
  top: var(--slider-piece-top);
  width: var(--slider-piece-size);
  height: auto;
  aspect-ratio: 1;
  border-radius: 7px;
  clip-path: polygon(0 0, 36% 0, 36% 17%, 64% 17%, 64% 0, 100% 0, 100% 36%, 83% 36%, 83% 64%, 100% 64%, 100% 100%, 64% 100%, 64% 83%, 36% 83%, 36% 100%, 0 100%, 0 64%, 17% 64%, 17% 36%, 0 36%);
}

.slider-captcha__piece {
  z-index: 3;
  left: 0;
  display: block;
  border: 0;
  background: #dce1e9;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.94), 0 5px 12px rgba(10, 18, 35, 0.34);
  filter:
    brightness(1.12)
    saturate(1.18)
    contrast(1.08)
    drop-shadow(0 0 2px rgba(255, 255, 255, 1))
    drop-shadow(0 0 5px rgba(48, 38, 155, 0.96))
    drop-shadow(0 6px 7px rgba(10, 18, 35, 0.62));
  transform: translate3d(0, 0, 0);
  transition: filter 0.2s ease;
  will-change: transform;
}

.slider-captcha__track {
  position: relative;
  height: 46px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #dfe3eb;
  border-radius: 9px;
  background: #f3f3ff;
}

.slider-captcha__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 44px;
  background: rgba(115, 102, 255, 0.12);
  pointer-events: none;
}

.slider-captcha__instruction {
  position: absolute;
  inset: 0 12px 0 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71798a;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05px;
  pointer-events: none;
}

.slider-captcha__handle {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--slider-primary);
  box-shadow: 0 4px 10px rgba(115, 102, 255, 0.28);
  cursor: grab;
  touch-action: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.slider-captcha__handle span {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-1px);
}

.slider-captcha__handle:active {
  cursor: grabbing;
}

.slider-captcha__handle:focus-visible,
.slider-captcha__reset:focus-visible {
  outline: 3px solid rgba(115, 102, 255, 0.25);
  outline-offset: 2px;
}

.slider-captcha__status {
  display: block;
  min-height: 22px;
  padding: 5px 2px 0;
  color: #7d8595;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.slider-captcha__noscript {
  display: block;
  color: var(--slider-error);
  font-size: 12px;
}

.slider-captcha.is-dragging .slider-captcha__preview {
  border-color: rgba(115, 102, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(115, 102, 255, 0.1);
}

.slider-captcha.is-error .slider-captcha__preview {
  border-color: rgba(223, 71, 88, 0.7);
  box-shadow: 0 0 0 3px rgba(223, 71, 88, 0.08);
}

.slider-captcha.is-error .slider-captcha__status {
  color: var(--slider-error);
}

.slider-captcha.is-verified .slider-captcha__preview {
  border-color: rgba(46, 175, 103, 0.7);
  box-shadow: 0 0 0 3px rgba(46, 175, 103, 0.09);
}

.slider-captcha.is-verified .slider-captcha__piece {
  filter:
    brightness(1.08)
    saturate(1.1)
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.92))
    drop-shadow(0 3px 5px rgba(46, 175, 103, 0.55));
}

.slider-captcha.is-verified .slider-captcha__handle {
  background: var(--slider-success);
  box-shadow: 0 4px 10px rgba(46, 175, 103, 0.27);
}

.slider-captcha.is-verified .slider-captcha__fill {
  background: rgba(46, 175, 103, 0.14);
}

.slider-captcha.is-verified .slider-captcha__instruction,
.slider-captcha.is-verified .slider-captcha__status {
  color: #238d52;
}

.slider-captcha.is-locked .slider-captcha__preview {
  border-color: rgba(223, 71, 88, 0.7);
  filter: grayscale(0.45);
}

.slider-captcha.is-locked .slider-captcha__handle {
  background: #8c94a4;
  box-shadow: none;
  cursor: not-allowed;
}

.slider-captcha.is-locked .slider-captcha__track {
  background: #eceef3;
}

.slider-captcha.is-locked .slider-captcha__instruction,
.slider-captcha.is-locked .slider-captcha__status {
  color: var(--slider-error);
}

.slider-captcha__reset:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.slider-captcha + .slider-captcha {
  margin-top: 16px;
}

[data-slider-captcha-submit]:disabled {
  cursor: not-allowed !important;
  opacity: 0.62 !important;
}

body.dark-only .slider-captcha,
.dark-theme .slider-captcha {
  color: #edf0f7;
}

body.dark-only .slider-captcha__reset,
.dark-theme .slider-captcha__reset {
  color: #bac1d0;
  background: #3b4250;
}

body.dark-only .slider-captcha__track,
.dark-theme .slider-captcha__track {
  border-color: #4c5363;
  background: #292f3b;
}

body.dark-only .slider-captcha__instruction,
body.dark-only .slider-captcha__status,
.dark-theme .slider-captcha__instruction,
.dark-theme .slider-captcha__status {
  color: #b4bbca;
}

@media (max-width: 420px) {
  .slider-captcha__instruction {
    justify-content: flex-start;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slider-captcha__preview,
  .slider-captcha__reset {
    transition: none;
  }
}
