/* forms.css - Form Input Styles */

/* Number Input Components */
#smartfence-embed-root .number-input-container { 
  display: flex;
  gap: 0.75rem; /* Increased gap */
  max-width: 300px;
}

#smartfence-embed-root .number-input { 
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  font-family: var(--font-family);
}

#smartfence-embed-root .number-input:focus { 
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* contact-form.css - Enhanced Contact Form Styling */

/* Contact Form Section */
#smartfence-embed-root .contact-form-section { 
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}

#smartfence-embed-root .contact-form-section h4 { 
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  text-align: center;
}

#smartfence-embed-root .contact-form-section > p { 
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.5;
}

/* Contact Form */
#smartfence-embed-root .contact-form { 
  max-width: 100%;
  margin: 0 auto;
}

#smartfence-embed-root .form-row { 
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#smartfence-embed-root .form-group { 
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

#smartfence-embed-root .form-group label { 
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.form-group input[type="text"],
.form-group input[type="email"],
#smartfence-embed-root .form-group input[type="tel"] { 
  padding: 0.75rem;
  border: 1px solid var(--border-color); /* Changed from 2px primary to 1px neutral */
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
  font-family: var(--font-family);
}

/* SELECT DROPDOWN STYLING - ADDED */
#smartfence-embed-root .form-group select { 
  padding: 0.75rem;
  padding-right: 2.5rem; /* Extra padding for custom arrow */
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
  font-family: var(--font-family);
  cursor: pointer;
  
  /* Remove default arrow */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  
  /* Add custom arrow */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

#smartfence-embed-root .form-group select:hover { 
  border-color: var(--text-secondary);
}

#smartfence-embed-root .form-group select:focus { 
  outline: none;
  border-color: var(--text-secondary);
  box-shadow: none;
}

/* Make readonly inputs look the same as editable ones */
#smartfence-embed-root .form-group input[readonly] { 
  border: 1px solid var(--border-color); /* Same border as editable inputs */
  background-color: var(--bg-primary); /* Same background as editable inputs */
  color: var(--text-primary); /* Same text color */
  cursor: default; /* Show it's not editable */
}

#smartfence-embed-root .form-group input:focus { 
  outline: none;
  border-color: var(--text-secondary); /* Changed from primary to neutral grey */
  box-shadow: none; /* Removed blue shadow */
}

/* Readonly inputs don't get focus styling */
#smartfence-embed-root .form-group input[readonly]:focus { 
  border-color: var(--border-color); /* Keep original border color */
}

#smartfence-embed-root .form-group input:invalid { 
  border-color: var(--text-light); /* Changed from danger color to neutral */
}

#smartfence-embed-root .form-group input::placeholder { 
  color: var(--text-light);
}

/* Radio Group Styling */
#smartfence-embed-root .radio-group { 
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

#smartfence-embed-root .radio-label { 
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  background-color: var(--bg-primary);
}

#smartfence-embed-root .radio-label:hover { 
  border-color: var(--primary-color);
  background-color: var(--bg-tertiary);
}

#smartfence-embed-root .radio-label input[type="radio"] { 
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked + span,
#smartfence-embed-root .radio-label:has(input[type="radio"]:checked) { 
  color: var(--primary-color);
  font-weight: 600;
}

#smartfence-embed-root .radio-label:has(input[type="radio"]:checked) { 
  border-color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}

/* Form Actions */
#smartfence-embed-root .form-actions { 
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* Error States - Neutral styling */
#smartfence-embed-root .form-group.error input { 
  border-color: var(--text-light); /* Changed from danger to neutral */
  box-shadow: none; /* Removed red shadow */
}

#smartfence-embed-root .radio-group.error .radio-label { 
  border-color: var(--danger-color);
}

#smartfence-embed-root .field-error { 
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--danger-color);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

#smartfence-embed-root .field-error i { 
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Error Summary */
#smartfence-embed-root .error-summary { 
  background-color: #fef2f2;
  border: 2px solid var(--danger-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: var(--danger-color);
}

#smartfence-embed-root .error-summary h5 { 
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#smartfence-embed-root .error-summary ul { 
  margin: 0;
  padding-left: 1.5rem;
}

#smartfence-embed-root .error-summary li { 
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

#smartfence-embed-root .error-close-btn { 
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  transition: var(--transition);
}

#smartfence-embed-root .error-close-btn:hover { 
  opacity: 0.7;
}

/* Success State */
#smartfence-embed-root .form-success { 
  text-align: center;
  padding: 2rem;
  color: var(--success-color);
}

#smartfence-embed-root .form-success i { 
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--success-color);
}

#smartfence-embed-root .form-success h4 { 
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--success-color);
}

#smartfence-embed-root .form-success p { 
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

#smartfence-embed-root .form-success strong { 
  color: var(--text-primary);
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #smartfence-embed-root .contact-form-section { 
    padding: 1.5rem;
    margin-top: 1.5rem;
  }
  
  #smartfence-embed-root .form-row { 
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  #smartfence-embed-root .form-group { 
    margin-bottom: 1.25rem;
  }
  
  #smartfence-embed-root .form-group select { 
    padding: 0.75rem;
    padding-right: 2.5rem;
  }
  
  #smartfence-embed-root .radio-group { 
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #smartfence-embed-root .radio-label { 
    justify-content: center;
    padding: 0.75rem;
  }
  
  #smartfence-embed-root .form-actions { 
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  #smartfence-embed-root .contact-form-section { 
    padding: 1rem;
  }
  
  .form-group input,
  #smartfence-embed-root .form-group select { 
    font-size: 0.9375rem;
  }
}