/**
 * Nebula Accessibility — contact form styles.
 * WCAG 2.2 AA: contrast, focus, target size, niet alleen kleur, reduced motion.
 */

/* ---------- Intro-blok ---------- */
/* ---------- Intro-tekst ---------- */
.nebula-a11y-intro {
  margin: 0 0 2.5rem 0;   /* AANPASBAAR — meer/minder ruimte onder de intro */
  font-size: 0.95rem;
  line-height: 1.5;
}

.nebula-a11y-intro + .form-item,
.nebula-a11y-intro + .js-form-item,
.nebula-a11y-intro + div {
  margin-top: 2rem;
}

/* ---------- Ingelogde gebruiker-melding ---------- */
.nebula-a11y-user-notice {
  margin: 0 0 1.5rem 0;
  padding: 0.75rem 1rem;
  background-color: #eef4ff;
  border-left: 4px solid #1a4f9c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.nebula-a11y-user-notice a {
  color: #1a4f9c;
  text-decoration: underline;
}

.nebula-a11y-user-notice a:focus-visible {
  outline: 3px solid #ffbf00;
  outline-offset: 2px;
}

/* ---------- Algemene formstructuur ---------- */
.contact-message-form .form-item,
.contact-message-form .js-form-item {
  margin-block: 1.25rem;
}

.contact-message-form label {
  display: block;
  font-weight: 600;
  margin-block-end: 0.35rem;
  font-size: 1rem;
  line-height: 1.4;
}

.contact-message-form .form-required::after {
  content: " *";
  color: currentColor;
  font-weight: 700;
}

/* ---------- Inputs ---------- */
.contact-message-form input[type="text"],
.contact-message-form input[type="email"],
.contact-message-form textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 2px solid #4a4a4a;
  border-radius: 6px;
  background-color: #fff;
  color: #111;
  box-sizing: border-box;
}

.contact-message-form textarea {
  min-height: 9rem;
  resize: vertical;
}

/* ---------- Focus state (theme-override met !important) ---------- */
.contact-message-form :is(input, textarea, button, a):focus-visible {
  outline: 3px solid #ffbf00 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.85) !important;
  border-color: #111 !important;
}

/* ---------- Hulptekst ---------- */
.contact-message-form .description,
.contact-message-form .form-item__description {
  margin-block-end: 0.4rem;
  font-size: 0.95rem;
  color: #333;
}

/* ---------- Fouten (1.4.1 — niet alleen kleur) ---------- */
.nebula-a11y-has-error input,
.nebula-a11y-has-error textarea,
.form-item--error input,
.form-item--error textarea {
  border-color: #b00020 !important;
  border-width: 2px !important;
  background-image: linear-gradient(transparent, transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b00020'><path d='M12 2 1 21h22L12 2zm0 6 7.5 13h-15L12 8zm-1 4v4h2v-4h-2zm0 5v2h2v-2h-2z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem 1.25rem;
  padding-right: 2.5rem;
}

.form-item--error-message,
.contact-message-form .form-item--error-message {
  display: flex !important;
  align-items: flex-start;
  gap: 0.4rem;
  margin-block-start: 0.4rem;
  color: #8b0000 !important;
  font-weight: 600;
}

.form-item--error-message::before {
  content: "\26A0";
  font-size: 1.1em;
  line-height: 1;
}

/* ---------- Submit-knop ---------- */
.contact-message-form .nebula-a11y-submit,
.contact-message-form .button--primary {
  min-height: 2.75rem;
  min-width: 8rem;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

/* ---------- Visually hidden (status live region) ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .contact-message-form * {
    transition: none !important;
    animation: none !important;
  }
}
/* ---------- Verplaatste foutsamenvatting (door JS) ---------- */
.nebula-a11y-relocated-messages {
  margin: 0 0 1.5rem 0;
  padding: 1rem 1.25rem;
  background-color: #fde8e8;
  border-left: 6px solid #b00020;
  color: #5a0010;
  font-weight: 500;
}

.nebula-a11y-relocated-messages h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.nebula-a11y-relocated-messages ul {
  margin: 0;
  padding-left: 1.25rem;
}

.nebula-a11y-relocated-messages li {
  margin-block: 0.25rem;
}
