/* ─────────────────────────────────────────────
   PPG Contact Form — States & Validation
   ───────────────────────────────────────────── */

/* ── Field error state ───────────────────────── */
.field-error {
  border-color: #C0392B !important;
}

.field-error-msg {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #C0392B;
  font-weight: 500;
}

/* ── Submit button loading state ─────────────── */
.form-submit--loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

.form-submit--loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

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

/* ── Success state ───────────────────────────── */
.form-success {
  border: 1px solid var(--line);
  padding: 56px 40px;
  text-align: center;
}

.form-success__icon {
  width: 48px;
  height: 48px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.form-success__icon svg {
  width: 22px;
  height: 22px;
}

.form-success h3 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.form-success p {
  font-size: 15px;
  color: var(--mid);
  line-height: 1.65;
  max-width: 340px;
  margin: 0 auto;
}

.form-success p + p {
  margin-top: 8px;
}

/* ── Error fallback state ────────────────────── */
.form-error {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 18px 20px;
  margin-bottom: 20px;
  border-radius: 2px;
}

.form-error__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #C0392B;
  margin-top: 1px;
}

.form-error__body {
  font-size: 14px;
  color: #7F1D1D;
  line-height: 1.55;
}

.form-error__body strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: #991B1B;
}

.form-error__body a {
  color: #991B1B;
  text-decoration: underline;
}
