/* Contact Form — WCAG 2.1 AA Compliant Styles
   Prefix: cf — all selectors scoped to .cf to avoid conflicts */

.cf {
  max-width: 600px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1.5;
  color: #1a1a1a;
  background-color: #ffffff;
}

.cf *,
.cf *::before,
.cf *::after {
  box-sizing: border-box;
}

/* Container */
.cf__container {
  background: #ffffff;
  padding: 32px;
  border-radius: 8px;
  border: 1px solid #c8cdd3;
}

/* Heading & description */
.cf__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
}

.cf__description {
  margin: 0 0 28px;
  font-size: 0.9375rem;
  color: #3d4550;
  text-align: center;
}

/* Required note */
.cf__required-note {
  font-size: 0.875rem;
  color: #3d4550;
  margin-bottom: 24px;
  display: block;
}

/* Form groups */
.cf__group {
  margin-bottom: 22px;
}

/* Labels */
.cf__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
}

.cf__required {
  color: #b91c1c;
  margin-left: 3px;
  font-weight: 700;
}

/* Inputs & textarea */
.cf__input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #6b7280;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a1a;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.cf__input:hover {
  border-color: #374151;
}

.cf__input:focus {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
  box-shadow: none;
}

.cf__input:invalid {
  border-color: #6b7280;
  box-shadow: none;
}

.cf__textarea {
  min-height: 120px;
  resize: vertical;
  background-color: #ffffff;
  color: #1a1a1a;
  display: block;
}

/* Inline error messages */
.cf__error {
  display: none;
  margin-top: 6px;
  font-size: 0.875rem;
  color: #b91c1c;
  font-weight: 600;
}

.cf__error::before {
  content: "⚠ ";
}

.cf__input--error {
  border-color: #b91c1c;
}

.cf__input--error:focus {
  outline-color: #b91c1c;
  border-color: #b91c1c;
}

/* Submit button */
.cf__submit {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background-color: #09224e;
  color: #ffffff;
  border: 2px solid transparent;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 10px;
  text-align: center;
}

.cf__submit:hover {
  background-color: #2B5BA6;
}

.cf__submit:focus {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
  background-color: #1e40af;
}

.cf__submit:active {
  background-color: #1e3a8a;
}

.cf__submit:disabled,
.cf__submit[aria-disabled="true"] {
  background-color: #6b7280;
  cursor: not-allowed;
  pointer-events: none;
}

/* Status / alert region */
.cf__status {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 5px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  display: none;
}

.cf__status--success {
  background-color: #f0fdf4;
  border-color: #16a34a;
  color: #14532d;
}

.cf__status--error {
  background-color: #fef2f2;
  border-color: #b91c1c;
  color: #7f1d1d;
}

/* Honeypot — off-screen, not display:none so bots still see it */
.cf__honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Screen-reader only utility */
.cf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .cf__container {
    padding: 20px 16px;
  }

  .cf__title {
    font-size: 1.25rem;
  }
}

/* Placeholder text — #555555 on #ffffff passes WCAG AA contrast */
.cf__input::placeholder {
  color: #555555;
  opacity: 1; /* Firefox reduces opacity by default */
}

/* Explicit background on textarea — some scanners need it on the element directly */
#cf-comments {
  background-color: #ffffff;
  color: #1a1a1a;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cf__input,
  .cf__submit {
    transition: none;
  }
}