/* Scoped reset + platform chrome. No design decisions here — those belong to
   the child theme (TEMPLATE-STANDARD.md §1). Tailwind preflight is forbidden;
   this is its replacement.

   Every colour below resolves through a theme.json preset, so the cookie
   notice and the contact form take each template's own palette. The literal
   values are fallbacks for the one case where presets are absent — a template
   with a broken theme.json — and are greyscale on purpose: the parent has no
   colour opinion to express, and a site showing these is visibly unfinished.

   The five slugs are fixed platform-wide (TEMPLATE-STANDARD.md §3):
   primary, secondary, accent, text, surface. */

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

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* Visible focus on everything interactive. Never outline:none (§9). */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* --- contact form ------------------------------------------------------- */
.drovi-contact-form p { margin-block: 0 1rem; }
.drovi-contact-form label { display: block; margin-block-end: 0.25rem; }
.drovi-contact-form input,
.drovi-contact-form textarea { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid currentColor; }

/* The consent checkbox reads as one line with its label, not as a field. */
.drovi-contact-form__consent { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.drovi-contact-form__consent input[type="checkbox"] { width: auto; padding: 0; }
.drovi-contact-form__consent label { display: inline; margin-block-end: 0; flex: 1 1 16rem; }

/* Errors are never signalled by colour alone (§9): they carry role="alert",
   their own text, and aria-invalid on the field that caused them. */
.drovi-contact-form__errors {
  border-inline-start: 3px solid var(--wp--preset--color--accent, currentColor);
  padding: 0.5rem 0 0.5rem 0.75rem;
}
.drovi-contact-form__errors ul { margin: 0; padding-inline-start: 1rem; }
.drovi-contact-form__ok {
  border-inline-start: 3px solid var(--wp--preset--color--primary, currentColor);
  padding: 0.5rem 0 0.5rem 0.75rem;
}

/* --- cookie notice ------------------------------------------------------ */
.drovi-consent {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 9999;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--wp--preset--color--primary, #1a1a1a);
  color: var(--wp--preset--color--surface, #ffffff);
  font-size: 0.875rem; line-height: 1.5;
}
.drovi-consent p { margin: 0; max-width: 60ch; }
.drovi-consent a { color: inherit; }
.drovi-consent__ok {
  padding: 0.5rem 1rem;
  background: var(--wp--preset--color--surface, #ffffff);
  color: var(--wp--preset--color--primary, #1a1a1a);
  border: 0; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
