/* Axencia.co — Contact Form: World-Class Ultra UI */

/* Progress bar — liquid gradient, smooth fill */
.form-progress-wrap {
  margin-bottom: 36px;
  padding: 20px 24px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 16px;
  animation: formProgressReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes formProgressReveal {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.form-progress-label span:last-child {
  font-weight: 600;
  color: #93c5fd;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.form-progress-bar {
  height: 8px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.form-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #6366f1);
  background-size: 200% 100%;
  border-radius: 8px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.form-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 8px 8px 0 0;
}

/* Input wrapper — room for check icon */
.form-input-wrap {
  position: relative;
}

.form-input-wrap input,
.form-input-wrap textarea,
.form-input-wrap select {
  padding-right: 44px !important;
}

.form-input-wrap:has(textarea) textarea {
  padding-bottom: 36px !important;
}

/* Input indicators */
.form-input-wrap .char-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-size: 0.75rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  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; }

.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, transform 0.3s ease;
}

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

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

/* Check icon for textarea — top-right of textarea */
.form-input-wrap:has(textarea) {
  position: relative;
}

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

.form-input-wrap:has(textarea) .char-count {
  bottom: 14px;
  right: 14px;
}

/* Ensure form-group has relative for any direct indicators */
.form-group {
  position: relative;
}

/* Form container — ultra glass */
.form-container-enhanced {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(59, 130, 246, 0.12);
  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-container-enhanced .form-group input,
.form-container-enhanced .form-group textarea,
.form-container-enhanced .form-group select {
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 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);
}

.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); }
}

.form-group label .required-dot {
  color: #ef4444;
  margin-left: 2px;
}
