/* Brand accent override for the "Good" theme's default teal (--bs-primary:
   #4FC9DA), evoking the green cloth cover of a real "Registro di Entrata e
   Uscita" narcotics ledger. Every value below is that same original teal,
   hue-rotated to green (H 187 -> H 140) with each token's own saturation and
   lightness left untouched -- so --bs-primary-active is still exactly as
   much darker than --bs-primary as it was in teal, --bs-primary-light is
   still exactly as light and vivid, .btn-primary's hover state is still
   exactly as much lighter than its base as before, and its text is still
   black (the original chose black because teal is light enough for the
   contrast; the rotation preserves lightness, so that's still true of this
   green). Picking colors independently per token, instead of rotating the
   original set together, was what made the previous version look
   inconsistent -- an unrelated dark/desaturated --bs-primary-active next to
   a bright/saturated --bs-primary reads as muddy no matter which shade of
   green either one is on its own. Grays, secondary, and every other
   semantic color are untouched.

   Two levels of override are needed: the root custom properties below cover
   every var(--bs-primary...) consumer in style.bundle.css (bg-primary,
   link-primary, btn-light-primary, the alert/badge "subtle" variants, ~200
   rules total) -- but .btn-primary's own hover/active/disabled state colors,
   plus its focus-ring shadow, are hardcoded locally by the compiled theme
   bundle rather than derived from the root token, so they need a second,
   explicit override or they'd stay teal. Loaded after style.bundle.css so
   these declarations win on specificity ties. */

/* style.bundle.css sets body { font-family: Inter, Helvetica, "sans-serif" },
   but the theme itself never ships Inter -- the original relies on Google
   Fonts' CDN <link>, which we deliberately dropped from _layout.html.twig so
   the pre-auth pages make zero third-party calls before credentials are
   sent. Without it every page silently falls back to Helvetica, which reads
   visibly thinner/narrower than the reference (see e.g. the sign-in submit
   button and page width at mobile widths). Self-hosting instead: this is
   Inter's variable font, latin subset only (covers Italian accented
   characters, U+0000-00FF) -- one file serves the whole 300-700 weight
   range the theme uses, sourced from Google Fonts' own CDN at build time. */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url(../fonts/inter/inter-latin-variable.woff2) format('woff2');
}

:root {
	--bs-primary: #4FDA7D;
	--bs-primary-rgb: 79, 218, 125;
	--bs-primary-active: #30B65C;
	--bs-primary-light: #DDFCE7;
	--bs-primary-inverse: #FFFFFF;
	--bs-primary-text-emphasis: #205732;
	--bs-primary-bg-subtle: #DCF8E6;
	--bs-primary-border-subtle: #B9F0CB;
}

/* Chrome/Edge paint autofilled fields with their own pale-yellow inset
   box-shadow, which overrides form-control-solid's gray background and
   can't be reset like a normal background-color -- has to be beaten with
   another inset box-shadow the same color as the field. The long transition
   delay is the standard trick to stop the browser re-asserting its yellow
   after the override paints. */
.form-control.form-control-solid:-webkit-autofill,
.form-control.form-control-solid:-webkit-autofill:hover,
.form-control.form-control-solid:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--bs-gray-700);
	-webkit-box-shadow: 0 0 0 1000px var(--bs-gray-100) inset;
	box-shadow: 0 0 0 1000px var(--bs-gray-100) inset;
	transition: background-color 5000s ease-in-out 0s;
}

/* Aside photo (register-bg.jpg, see _layout.html.twig) only fits below lg:
   above it the column has real height (position-xl-fixed's flow starts
   applying and the heading/tagline are visible) so the photo, pinned to the
   bottom at the container's full width, has room to sit under that content
   properly. Below lg the box is just the logo + padding -- far shorter than
   the photo's rendered height -- so the bottom-anchored image clips to a
   strip that lands right behind the logo instead of below it. Flat
   form-control-solid gray stands in there instead. */
.aside-photo {
	background-color: var(--bs-gray-100);
}

@media (min-width: 992px) {
	.aside-photo {
		background-image: url(/templates/good/assets/custom/register-bg.jpg);
		background-repeat: no-repeat;
		background-position: bottom center;
		background-size: 100% auto;
	}
}

.btn-primary {
	--bs-btn-color: #000000;
	--bs-btn-bg: #4FDA7D;
	--bs-btn-border-color: #4FDA7D;
	--bs-btn-hover-color: #000000;
	--bs-btn-hover-bg: #69E091;
	--bs-btn-hover-border-color: #61DE8B;
	--bs-btn-focus-shadow-rgb: 67, 185, 106;
	--bs-btn-active-color: #000000;
	--bs-btn-active-bg: #72E196;
	--bs-btn-active-border-color: #61DE8B;
	--bs-btn-disabled-color: #000000;
	--bs-btn-disabled-bg: #4FDA7D;
	--bs-btn-disabled-border-color: #4FDA7D;
}
