/* 
 * Form Styles for iDwteam website
 * Used across all forms including contact forms and job applications
 */

/* Form container */
.form-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Form groups */
.form-group {
  margin-bottom: 1.5rem;
}

/* Labels */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary, #374151);
}

/* Required field indicator */
.form-label.required::after {
  content: "*";
  color: #f56565;
  margin-left: 0.25rem;
}

/* Text inputs, textareas */
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 1px solid var(--neutral-300, #e2e8f0);
  border-radius: 0.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary, #0157ff);
  box-shadow: 0 0 0 3px rgba(1, 87, 255, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* File inputs */
.form-file-input {
  display: none;
}

.file-upload-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--neutral-100, #f7fafc);
  color: var(--text-secondary, #4a5568);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
  border: 1px dashed var(--neutral-300, #e2e8f0);
}

.file-upload-button:hover {
  background: var(--neutral-200, #edf2f7);
}

.file-name {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary, #0157ff);
}

/* Checkboxes & Radio buttons */
.form-checkbox-group,
.form-radio-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.form-checkbox,
.form-radio {
  margin-top: 0.25rem;
}

/* Error states */
.form-input.error,
.form-textarea.error {
  border-color: #e53e3e;
  background-color: #fff5f5;
}

.form-error-message {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Form error container */
.form-errors {
  background-color: #fff5f5;
  border-left: 3px solid #e53e3e;
  color: #e53e3e;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Submit buttons */
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--combined-gradient, linear-gradient(to right, #0157ff, #0099ff));
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 150px;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(1, 87, 255, 0.3);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-submit.loading {
  position: relative;
  color: transparent;
}

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

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

/* Success message */
.form-success {
  background-color: #f0fff4;
  border-left: 3px solid #48bb78;
  color: #2f855a;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Privacy policy checkbox */
.privacy-policy {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.privacy-policy input[type="checkbox"] {
  margin-top: 0.25rem;
}

.privacy-policy label {
  font-size: 0.9rem;
  color: var(--text-secondary, #4a5568);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .form-submit {
    width: 100%;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
}