/* =========================================
   PREMIUM CAPTCHA STYLES
   ========================================= */
.captcha-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.captcha-image-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

#captcha-canvas {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  max-width: 100%;
  height: auto;
}

.captcha-refresh-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 22px;
  color: #64748b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.captcha-refresh-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: rotate(180deg);
  border-color: var(--primary-color);
}

.captcha-input-group {
  max-width: 320px;
}

/* Monospaced input with character spacing */
#captcha_input {
  font-family: 'Courier New', Courier, monospace !important;
  letter-spacing: 5px !important;
  font-weight: 800 !important;
  text-transform: none !important;
  font-size: 1.25rem !important;
  text-align: center;
  padding: 12px !important;
  height: auto !important;
  border-width: 2px !important;
  transition: all 0.3s ease;
}

.captcha-status {
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 24px;
  margin-top: 8px;
  transition: all 0.3s ease;
}

.captcha-attempts {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 5px;
}

.captcha-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
  font-style: italic;
}

/* Validation States */
.is-invalid {
  border-color: #dc3545 !important;
  background-color: #fff5f5 !important;
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.is-valid {
  border-color: #28a745 !important;
  background-color: #f0fff4 !important;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Dark Mode Support */
[data-theme='dark'] #captcha-canvas {
  border-color: #334155;
  background: #1e293b;
}

[data-theme='dark'] .captcha-refresh-btn {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
}
