.puzzle-captcha-host {
  margin-top: 16px;
}

.captcha-layer-wrap {
  padding: 12px;
  background: #f7f7f7;
}

.captcha-layer-wrap .puzzle-captcha-host {
  margin-top: 0;
}

.puzzle-captcha {
  width: 100%;
  max-width: 360px;
  user-select: none;
}

.puzzle-captcha * {
  box-sizing: border-box;
}

.puzzle-card {
  border: 1px solid #d8d8d8;
  background: #fff;
  padding: 8px;
}

.puzzle-header {
  margin: 2px 4px 8px;
}

.puzzle-title {
  font-size: 38px;
  line-height: 1.02;
  font-weight: 700;
  color: #111;
  transform: scale(0.5);
  transform-origin: left top;
  white-space: nowrap;
  height: 20px;
}

.puzzle-subtitle {
  margin-top: 2px;
  font-size: 28px;
  line-height: 1;
  color: #555;
  transform: scale(0.5);
  transform-origin: left top;
  white-space: nowrap;
  height: 15px;
}

.puzzle-board {
  position: relative;
  width: 100%;
  height: 124px;
  border: 1px solid #ececec;
  background: #efefef;
  overflow: hidden;
}

.puzzle-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: grayscale(0.18) brightness(1.06);
}

.puzzle-hole,
.puzzle-piece {
  position: absolute;
  width: 42px;
  height: 42px;
}

.puzzle-hole {
  background: rgba(45, 45, 45, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.puzzle-hole::before,
.puzzle-hole::after {
  content: "";
  position: absolute;
  background: rgba(45, 45, 45, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.puzzle-hole::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  right: -6px;
  top: 15px;
}

.puzzle-hole::after {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  left: 15px;
  bottom: -6px;
}

.puzzle-piece {
  border: 1px solid rgba(80, 80, 80, 0.45);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
  background-repeat: no-repeat;
  background-size: cover;
  cursor: grab;
  z-index: 2;
}

.puzzle-piece::before,
.puzzle-piece::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(80, 80, 80, 0.45);
  background: inherit;
}

.puzzle-piece::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  right: -7px;
  top: 15px;
}

.puzzle-piece::after {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  left: 15px;
  bottom: -7px;
}

.puzzle-piece.is-dragging {
  cursor: grabbing;
}

.puzzle-refresh {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  z-index: 5;
}

.puzzle-refresh:hover {
  background: rgba(0, 0, 0, 0.58);
}

.puzzle-board-arrow {
  position: absolute;
  left: 22px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid rgba(70, 70, 70, 0.6);
  z-index: 4;
}

.puzzle-slider {
  position: relative;
  margin-top: 9px;
  height: 40px;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background: #f2f2f2;
  overflow: hidden;
}

.puzzle-slider-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #e5f3da;
}

.puzzle-slider-text {
  position: absolute;
  inset: 0;
  line-height: 38px;
  text-align: center;
  color: #a6a6a6;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.puzzle-slider-btn {
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #d6d6d6;
  border-radius: 50%;
  background: #fff;
  color: #86c75c;
  font-size: 19px;
  line-height: 36px;
  text-align: center;
  letter-spacing: -1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

.puzzle-slider-btn.is-disabled {
  cursor: default;
}

.puzzle-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  color: #9b9b9b;
}

.puzzle-footer-icons {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  line-height: 1;
}

.puzzle-footer-brand {
  margin-left: auto;
  font-size: 11px;
}

.puzzle-captcha.is-success .puzzle-slider {
  border-color: #9fcb7e;
}

.puzzle-captcha.is-success .puzzle-slider-progress {
  background: #c9ebb4;
  width: 100% !important;
}

.puzzle-captcha.is-success .puzzle-slider-text,
.puzzle-captcha.is-success .puzzle-subtitle {
  color: #4f9b2c;
}

.puzzle-captcha.is-success .puzzle-title {
  color: #2b7f09;
}

@media (max-width: 560px) {
  .puzzle-captcha {
    max-width: 100%;
  }
}
