/**
 * Shared front-end form validation styles (donation/donate-now, contact-us, …)
 * Error nodes: .di-fv-msg.di-fv-msg--error
 */

.di-fv-input-invalid,
.di-fv-input-invalid:focus {
  border-color: #c53030 !important;
  box-shadow: 0 0 0 1px rgba(197, 48, 48, 0.15);
}

/* Theme left empty <p class="help"> rows — hide so errors sit tight under the field */
.js-contact-form .input-box > p.help,
.js-donate-now-step1 .input-box > p.help,
.js-qurbani-details .input-box > p.help {
  display: none !important;
}

.contact-form .input-box,
.contact-style1_form .input-box {
  margin-bottom: 0.25rem;
}

.di-fv-msg {
  display: block;
  margin-top: 0.15rem;
  margin-bottom: 0;
  padding: 0.35rem 0.55rem 0.35rem 2rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  border-radius: 5px;
  position: relative;
  clear: both;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.di-fv-msg--error {
  color: #742a2a;
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border: 1px solid #fc8181;
  box-shadow: 0 2px 8px rgba(197, 48, 48, 0.08);
  animation: diFvErrIn 0.28s ease-out;
  transition: opacity 0.2s ease, min-height 0.2s ease;
}

.di-fv-msg--error::before {
  content: "\f06a";
  font-family: "FontAwesome";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #c53030;
}

label.di-fv-msg,
label.error.di-fv-msg,
div.di-fv-msg--error {
  margin-top: 0.15rem;
  font-weight: 500;
}

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

.contact-form .input-box .di-fv-msg--error,
.form-group .di-fv-msg--error {
  margin-top: 0.12rem;
}

/* Checkout gift-aid: keep messages snug under controls */
#paymentFrm .form-group {
  margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
  .di-fv-msg {
    font-size: 0.78rem;
    padding-left: 1.85rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }
  .di-fv-msg--error::before {
    left: 0.45rem;
  }
}
