/* Word counter and contact form. Colours follow the theme when it sets them, with fallbacks. */
.wco-tool, .wco-contact {
  --wco-ink: var(--wp--preset--color--ink, #1a1f2b);
  --wco-muted: var(--wp--preset--color--muted, #4b5563);
  --wco-primary: var(--wp--preset--color--primary, #0a4fd6);
  --wco-surface: var(--wp--preset--color--surface, #f4f6fa);
  --wco-line: var(--wp--preset--color--line, #d9dee7);
  color: var(--wco-ink);
  margin: 0 0 2rem;
}
.wco-tool__title { margin: 0 0 .75rem; font-size: 1.5rem; line-height: 1.25; }
.wco-tool__label, .wco-contact label { display: block; font-weight: 600; margin: 0 0 .35rem; }
.wco-tool__input, .wco-contact input[type="text"], .wco-contact input[type="email"], .wco-contact textarea {
  display: block; width: 100%; box-sizing: border-box; padding: .75rem; font: inherit; line-height: 1.5;
  color: var(--wco-ink); background: #fff; border: 1px solid var(--wco-line); border-radius: 6px;
}
.wco-tool__input { min-height: 14rem; resize: vertical; }
.wco-tool__input:focus-visible, .wco-contact input:focus-visible, .wco-contact textarea:focus-visible,
.wco-tool__button:focus-visible { outline: 3px solid var(--wco-primary); outline-offset: 2px; }
.wco-tool__privacy { margin: .5rem 0 0; font-size: .9rem; color: var(--wco-muted); }
.wco-tool__actions { margin: 1rem 0; }
.wco-tool__button {
  font: inherit; font-weight: 600; cursor: pointer; padding: .65rem 1.25rem; min-height: 44px;
  color: #fff; background: var(--wco-primary); border: 0; border-radius: 6px;
}
.wco-tool__button:hover { filter: brightness(.9); }
.wco-tool__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 0; }
.wco-tool__stat { margin: 0; padding: .75rem; background: var(--wco-surface); border: 1px solid var(--wco-line); border-radius: 6px; }
.wco-tool__stat dt { margin: 0; font-size: .85rem; color: var(--wco-muted); }
.wco-tool__stat dd { margin: .15rem 0 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.wco-tool__noscript { margin: 1rem 0 0; font-weight: 600; }
@media (min-width: 640px) { .wco-tool__stats { grid-template-columns: repeat(4, 1fr); } }

.wco-contact p { margin: 0 0 1rem; }
.wco-contact__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wco-contact__notice { padding: .75rem 1rem; border-radius: 6px; border: 1px solid var(--wco-line); font-weight: 600; }
.wco-contact__notice--ok { background: #e8f5ec; border-color: #1c7a3d; color: #0f4d25; }
.wco-contact__notice--error { background: #fdecec; border-color: #b42318; color: #7a1710; }

@media (prefers-reduced-motion: reduce) { .wco-tool__button { transition: none; } }
