/*! 前台验证码组件样式（图形验证码 / 极验容器） */

.cw-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  color: var(--text-secondary, #94a3b8);
  font-size: 18px;
}

.cw-loading i {
  animation: cw-spin 1s linear infinite;
}

@keyframes cw-spin {
  to { transform: rotate(360deg); }
}

/* 图形验证码 */
.cw-image {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.cw-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-input, #f8fafc);
  color: var(--text-primary, #0f172a);
  font-size: 14px;
  letter-spacing: 2px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.cw-input:focus {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px var(--accent-light, rgba(99, 102, 241, .14));
}

.cw-img-wrap {
  position: relative;
  flex: 0 0 130px;
  height: 46px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
}

.cw-img-wrap:hover {
  border-color: var(--accent, #6366f1);
}

.cw-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cw-img-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .85);
  color: var(--accent, #6366f1);
  font-size: 16px;
}

.cw-img-loading i {
  animation: cw-spin 1s linear infinite;
}

/* 极验容器 */
.cw-geetest {
  min-height: 46px;
}

.cw-error {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .25);
  color: #ef4444;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 480px) {
  .cw-image {
    flex-direction: row;
  }
  .cw-img-wrap {
    flex: 0 0 112px;
  }
}
