/* Axencia.co — Contact Form: World-Class + Realtime Indicators */

/* Form container — enhanced glass */
.form-container-enhanced {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 
    0 32px 64px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Form progress indicator */
.form-progress-wrap {
  margin-bottom: 32px;
}

.form-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-progress-bar {
  height: 4px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.form-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 4px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input wrapper for indicators */
.form-input-wrap {
  position: relative;
}

.form-input-wrap .char-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: color 0.3s ease;
}

.form-input-wrap .char-count.valid {
  color: #22c55e;
}

.form-input-wrap .char-count.warning {
  color: #f59e0b;
}

.form-input-wrap .char-count.max {
  color: #ef4444;
}

/* Realtime validation indicators */
.form-input-wrap .field-indicator {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-input-wrap .field-indicator.valid {
  opacity: 1;
  color: #22c55e;
}

.form-input-wrap .field-indicator.invalid {
  opacity: 1;
  color: #ef4444;
}

.form-input-wrap .field-indicator svg {
  width: 16px;
  height: 16px;
}

.form-group .form-input-wrap textarea ~ .field-indicator,
.form-input-wrap:has(textarea) .field-indicator {
  top: 24px;
  transform: none;
}

/* Focus ring animation */
.form-container-enhanced .form-group input,
.form-container-enhanced .form-group textarea,
.form-container-enhanced .form-group select {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-container-enhanced .form-group input:focus,
.form-container-enhanced .form-group textarea:focus,
.form-container-enhanced .form-group select:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.12),
    0 4px 16px rgba(59, 130, 246, 0.15);
}

/* Submit button — loading state */
.form-submit-animated.sending {
  pointer-events: none;
  opacity: 0.85;
}

.form-submit-animated.sending::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: formSubmitSpin 0.8s linear infinite;
  margin-left: 10px;
}

@keyframes formSubmitSpin {
  to { transform: rotate(360deg); }
}

/* Required field indicator */
.form-group label .required-dot {
  color: #ef4444;
  margin-left: 2px;
}
