/* ==========================================================================
   PREMIUM CAPTCHA COMPONENT STYLE (GLASSMORPHISM & DARK GLOW)
   ========================================================================== */

.crm-captcha-widget {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.crm-captcha-widget:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 8px 32px 0 rgba(59, 130, 246, 0.08);
}

.crm-captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crm-captcha-img-container {
  flex: 1;
  height: 48px;
  position: relative;
  background: rgba(9, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.crm-captcha-img-container:hover {
  background: rgba(9, 15, 30, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

.crm-captcha-img-container svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Кнопка обновления капчи */
.crm-captcha-refresh-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text2, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.crm-captcha-refresh-btn:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  transform: scale(1.05);
}

.crm-captcha-refresh-btn:active {
  transform: scale(0.95);
}

.crm-captcha-refresh-btn i {
  font-size: 16px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.crm-captcha-refresh-btn:hover i {
  transform: rotate(180deg);
}

.crm-captcha-refresh-btn.spinning i {
  animation: crm-captcha-spin 0.6s linear infinite;
}

/* Поле ввода для капчи */
.crm-captcha-input-wrapper {
  position: relative;
  width: 100%;
}

.crm-captcha-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  color: var(--text, #fff) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  transition: all 0.25s ease;
  outline: none;
  box-sizing: border-box;
}

.crm-captcha-input::placeholder {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  font-size: 13px;
  color: var(--text3, #64748b);
  opacity: 0.8;
}

.crm-captcha-input:focus {
  border-color: rgba(59, 130, 246, 0.6) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

@keyframes crm-captcha-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
  .crm-captcha-widget {
    padding: 10px;
    gap: 10px;
  }
  .crm-captcha-input {
    font-size: 13px;
    padding: 10px;
  }
}
