/* Contact Form Styles */

.contact-form {
  max-width: 700px;
}

/* Honeypot field - hidden from users, visible to bots */
.contact-form .honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Form groups */
.contact-form .form-group {
  position: relative;
}

/* Labels */
.contact-form .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  display: block;
}

.contact-form .form-label .text-danger {
  color: #dc3545;
}

/* Form controls */
.contact-form .form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.contact-form .form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: rgba(0, 123, 255, 0.5);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.contact-form .form-control::placeholder {
  color: #6c757d;
}

/* Invalid state */
.contact-form .form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.contact-form .form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Valid state */
.contact-form .form-control.is-valid {
  border-color: #28a745;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.contact-form .form-control.is-valid:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Textarea specific */
.contact-form textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Invalid feedback */
.contact-form .invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

.contact-form .invalid-feedback.d-block {
  display: block;
}

.contact-form .is-invalid ~ .invalid-feedback {
  display: block;
}

/* Submit button */
.contact-form .btn-primary {
  position: relative;
  min-width: 150px;
}

.contact-form .btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.contact-form .btn-primary .spinner-border {
  margin-left: 0.5rem;
}

.contact-form .btn-primary.loading .submit-text {
  opacity: 0.6;
}

/* Alert messages */
.contact-form .alert {
  border-radius: 0.375rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0;
  border: 1px solid transparent;
}

.contact-form .alert.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.contact-form .alert.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.contact-form .alert.d-none {
  display: none !important;
}

/* Spinner animation */
.contact-form .spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Visually hidden text */
.contact-form .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .contact-form {
    max-width: 100%;
  }

  .contact-form .form-control {
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
  }

  .contact-form .btn-primary {
    width: 100%;
  }
}