/**
 * Custom child-theme overrides.
 * This file is conditionally enqueued by functions.php if it exists.
 * Add brand-specific styles here.
 */

/* Form controls
   --------------------------------------------------------------------------
   The parent deliberately paints no input chrome. It used to, against 1.x
   slugs that 2.0 deleted, so the declarations resolved to nothing and every
   field fell back to the browser default: a white box with dark text, on a
   dark canvas. Painting them is the child's job, because the child is what
   owns the palette.

   Written against the semantic slugs this theme declares, so a fork that
   changes the palette values gets correct fields for free, and a fork that
   renames a slug breaks here loudly rather than silently. Slug names come
   from the design system contract; change values in theme.json, not names. */

input[type="text"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
	background-color: var(--wp--preset--color--bg-inset);
	border: 1px solid var(--wp--preset--color--border-1);
	border-radius: 2px;
	color: var(--wp--preset--color--fg-1);
}

/* The focus ring is accent-bright, the slug the design system reserves for
   accent drawn ON a surface. On this light scheme it carries the brand blue:
   6.84:1 on bg-canvas, 5.84:1 on bg-inset, both clear of the 3:1 minimum. */
input[type="text"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
	border-color: var(--wp--preset--color--accent-bright);
	outline: 2px solid var(--wp--preset--color--accent-bright);
	outline-offset: 1px;
}

/* fg-4 is the metadata tone. Placeholder text is a hint, not content, but it
   still has to clear 4.5:1 against bg-inset. */
::placeholder {
	color: var(--wp--preset--color--fg-4);
	opacity: 1; /* Firefox dims placeholders by default; the colour above already carries the contrast. */
}

/* The search block wraps its input in a bordered container and hides the
   input's own border, so the wrapper is what needs painting. */
.wp-block-search__inside-wrapper {
	background-color: var(--wp--preset--color--bg-inset);
	border-color: var(--wp--preset--color--border-1);
}

.wp-block-search__input {
	background-color: transparent;
	color: var(--wp--preset--color--fg-1);
}
