/**
 * Native VedantTheme Theme Form Styles
 * Perfectly harmonizes with VedantTheme's typography (Montserrat & Nunito Sans),
 * gradient color tokens (#00deff -> #7141b1), .vedantTheme-btn buttons, and responsive grid.
 */

.custom-form-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.custom-contact-form.main-form,
.custom-contact-form .main-form {
  padding: 55px 48px;
  background-image: linear-gradient(90deg, #00deff 0%, #7141b1 100%);
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  font-family: "Nunito Sans", sans-serif;
}

.custom-contact-form.main-form h2,
.custom-contact-form .main-form h2 {
  font-family: Montserrat, sans-serif;
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.custom-contact-form.main-form .font14,
.custom-contact-form .main-form .font14 {
  font-family: "Nunito Sans", sans-serif;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 26px;
  line-height: 1.6;
}

/* Off-screen honeypot field to trap spam bots silently */
.form-group-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.custom-contact-form .form-group {
  margin-bottom: 20px;
  position: relative;
}

.custom-contact-form .form-row {
  display: flex;
  gap: 20px;
}

.custom-contact-form .form-row .form-group {
  flex: 1;
}

/* Theme-Native Form Controls */
.custom-contact-form .form-control-custom {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  color: #ffffff !important;
  font-family: "Nunito Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  outline: none;
  transition: all 0.3s ease;
  -webkit-appearance: none;
}

.custom-contact-form textarea.form-control-custom {
  min-height: 135px;
  resize: vertical;
}

.custom-contact-form .form-control-custom::placeholder {
  color: rgba(255, 255, 255, 0.82);
  font-family: "Nunito Sans", sans-serif;
  font-size: 15px;
  opacity: 1;
}

.custom-contact-form .form-control-custom:focus {
  background: rgba(255, 255, 255, 0.32);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.custom-contact-form .form-control-custom.is-invalid {
  border-color: #ff4d4f !important;
  background: rgba(255, 77, 79, 0.2) !important;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.2) !important;
}

.custom-contact-form .field-error {
  display: none;
  color: #ffeef0;
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  padding-left: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Theme-Native .vedantTheme-btn Button */
.custom-contact-form .form-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 18px 38px;
  border-radius: 30px;
  border: 2px solid transparent;
  cursor: pointer;
  background-color: #ffffff;
  color: #1b1d21;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-contact-form .form-submit-btn:hover:not(:disabled),
.custom-contact-form .form-submit-btn:focus:not(:disabled) {
  background-color: #1b1d21;
  color: #ffffff;
  border-color: #1b1d21;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.custom-contact-form .form-submit-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none !important;
}

/* Animated Spinner Component */
.custom-contact-form .btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(27, 29, 33, 0.2);
  border-top-color: #1b1d21;
  border-radius: 50%;
  animation: form-spin 0.8s linear infinite;
}

.custom-contact-form .form-submit-btn:hover .btn-spinner,
.custom-contact-form .form-submit-btn:focus .btn-spinner {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

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

/* Theme-Consistent Feedback Alerts */
.custom-contact-form .form-feedback-alert {
  padding: 16px 22px;
  border-radius: 6px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-top: 24px;
  text-align: center;
  line-height: 1.45;
}

.custom-contact-form .alert-success {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.custom-contact-form .alert-danger {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* Mobile Responsive Optimization */
@media (max-width: 767px) {
  .custom-contact-form.main-form,
  .custom-contact-form .main-form {
    padding: 38px 22px;
    border-radius: 8px;
  }

  .custom-contact-form.main-form h2,
  .custom-contact-form .main-form h2 {
    font-size: 24px;
  }

  .custom-contact-form .form-row {
    flex-direction: column;
    gap: 0;
  }

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