/**
 * 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: var(--wp--custom--radius--control); /* Command: square corners (theme.json settings.custom). */
	color: var(--wp--preset--color--fg-1);
}

/* The focus ring is accent-bright: 3.18:1 on bg-inset and 3.66:1 on
   bg-canvas, clearing the 3:1 non-text minimum, and still legible where a
   field sits on a dark fg-1 band (4.58:1). bg-inset was lightened one step to
   #EFEFF1 so this ring clears 3:1 on the field itself. */
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);
}

/* Full-bleed covers (CLI-111)
   --------------------------------------------------------------------------
   voyager-block-theme caps every child of a non-constrained full-width block
   at the wide size (`.alignfull:not(.is-layout-constrained) > *`, in
   assets/scss/partials/_blocks-core.scss). A cover's photo and overlay are
   such children, so above 1200px they stop short of the edges and the page
   shows white bars. theme.json block CSS cannot win here: WordPress wraps it
   in :where(), and the parent rule has class specificity. Delete this rule
   once the parent excludes the cover's background layers. */
.wp-block-cover.alignfull > .wp-block-cover__image-background,
.wp-block-cover.alignfull > .wp-block-cover__video-background,
.wp-block-cover.alignfull > .wp-block-cover__background {
	max-width: none;
}
