/*!
 * Bhoo Agrocare — employee check-in page (the page holding [employee_checkin]).
 * Enqueued from inc/enqueue.php when bhoo_agrocare_is_checkin_page() is true.
 *
 * Source order: hero -> sign-in card shell -> brand panel -> form panel ->
 * form -> responsive (one block per condition, widest first).
 *
 * The hero shows to everyone; the card only to a signed-out visitor, in place
 * of the plugin's "Please log in" line (inc/employee-login.php). Everything a
 * signed-in visitor sees below the hero is the plugin's own.
 *
 * The same house rules as the other stylesheets: tabs, tokens from :root in
 * main.css, literals only where the token set has no match.
 */

/* ==========================================================================
   Hero
   ========================================================================== */

.chero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(116deg, var(--g-100) 0%, var(--g-050) 32%, var(--g-025) 62%, var(--white) 100%);
}

.chero__leaves {
	position: absolute;
	left: -18px;
	top: -14px;
	z-index: -1;
	width: clamp(150px, 19vw, 290px);
	height: auto;
	pointer-events: none;
}

/* 39.5vw ≈ 100 / 2.53, the brand banner's aspect ratio, so through the desktop
   range the section stays the same shape as the artwork and nothing is cropped.
   Past the 620px cap it trims top and bottom, below the 400px floor it trims the
   left — both the artwork's empty margins, never its subject. */
.chero__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(400px, 39.5vw, 620px);
	padding-block: clamp(36px, 4.4vw, 64px);
}

/* Percentages resolve against .chero, the full-width parent, so the reserved
   strip is half the *container* once that hits its max-width, not half the
   screen. That lands the copy on the pale field the artwork keeps clear. */
.chero--art .chero__inner {
	padding-right: calc(min(var(--container) / 2, 50%) + clamp(16px, 2vw, 36px));
}

.chero__pill {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	margin: 0 0 clamp(16px, 2vw, 26px);
	padding: 9px 20px 9px 15px;
	border-radius: var(--r-pill);
	background: var(--g-mint);
	color: var(--g-800);
	font-family: var(--font-head);
	font-size: clamp(13.5px, 1.1vw, 15.5px);
	font-weight: 600;
}
.chero__pill .bhoo-icon { color: var(--g-600); }

.chero__copy {
	position: relative;
	z-index: 1;
}

/* Capped at 50px: the copy column is ~560px at the container's max width, and
   the default greeting's longest line ("Team Bhoo Agrocare") needs ~500px there.
   Anything larger wraps it to a third line. */
.chero__title {
	margin: 0;
	color: var(--g-900);
	font-size: clamp(30px, 3.6vw, 50px);
	line-height: 1.1;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.chero__lead {
	max-width: 27em;
	margin: clamp(14px, 1.7vw, 22px) 0 0;
	color: var(--ink-2);
	font-size: clamp(15px, 1.25vw, 18px);
	line-height: 1.65;
	text-wrap: pretty;
}

/* Points row — icon disk beside a two-line label, hairline rules between. */
.chero .chero__points {
	display: flex;
	
	align-items: stretch;
	gap: clamp(14px, 1.8vw, 26px);
	margin: clamp(26px, 3.2vw, 44px) 0 0;
	padding: 0;
	list-style: none;
}
.chero .chero__point {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}
.chero .chero__point + .chero__point {
	padding-left: clamp(14px, 1.8vw, 26px);
	border-left: 1px solid var(--g-100);
}
.chero__point-ico {
	display: grid;
	place-items: center;
	flex: none;
	width: clamp(42px, 3.4vw, 50px);
	height: clamp(42px, 3.4vw, 50px);
	border-radius: 50%;
	background: var(--g-mint);
	color: var(--g-700);
}
/* 9ch breaks a two-word label onto its own two lines, as the design shows. */
.chero__point-label {
	max-width: 9ch;
	color: var(--g-900);
	font-family: var(--font-head);
	font-size: clamp(13.5px, 1.1vw, 15px);
	font-weight: 600;
	line-height: 1.3;
}

/* ----------------------------------------------------------- hero artwork */

/* Full-bleed behind the whole section, not a column: the artwork is a finished
   banner whose own curve and leaves would otherwise be doubled by ours. z-index
   keeps it under .chero__inner, which the section's isolation traps inside the
   hero. */
.chero__art {
	position: absolute;
	inset: 0;
	z-index: -1;
}

/* Anchored right, so whenever the section is taller than the artwork's ratio the
   trim comes off the empty left field and the subject stays put. */
.chero__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right top;
}

/* Insurance, not decoration: it holds the copy legible over any artwork set
   later. Over the brand banner's pale field it is all but invisible. */
.chero__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(92deg, rgba(246, 250, 244, .96) 0%, rgba(246, 250, 244, .86) 34%, rgba(246, 250, 244, .40) 56%, rgba(246, 250, 244, 0) 72%);
}

/* The page's prose column carries an article's bottom padding; below this hero
   it holds an app, which owns its own spacing. */
.entry-content--app { padding-bottom: clamp(40px, 6vw, 80px); }


/* ==========================================================================
   Sign-in card shell
   ========================================================================== */

/* The card is laid out by its own width, not the viewport's: it sits in a
   narrow content column on desktop and full width on a phone. */
.elogin {
	container-type: inline-size;
	margin: clamp(24px, 4vw, 44px) 0 0;
}

.elogin__card {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 24px;
	background: var(--white);
	box-shadow: var(--sh-2);
}


/* ==========================================================================
   Card — brand panel
   ========================================================================== */

.elogin__aside {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: clamp(28px, 3.4vw, 40px);
	background:
		radial-gradient(120% 70% at 100% 0%, rgba(196, 243, 86, .14), transparent 58%),
		radial-gradient(90% 60% at 0% 100%, rgba(47, 158, 68, .34), transparent 62%),
		linear-gradient(160deg, var(--g-950) 0%, var(--g-800) 100%);
	color: rgba(255, 255, 255, .8);
}

/* A leaf in the corner, drawn like the footer's. A data URI cannot read a
   custom property, so the lime is a literal. */
.elogin__aside::after {
	content: "";
	position: absolute;
	right: -36px;
	bottom: -30px;
	z-index: -1;
	width: 220px;
	aspect-ratio: 1;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23c4f356' stroke-opacity='.16' stroke-width='1.6'%3E%3Cpath d='M180 20C90 22 30 70 24 176c96-4 150-60 156-156Z'/%3E%3Cpath d='M24 176C70 120 116 78 170 34'/%3E%3Cpath d='M70 128l-6-40M104 96l-4-44M92 110l40 4M126 76l38 2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	pointer-events: none;
}

.elogin__eyebrow {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 9px;
	margin: 0 0 16px;
	padding: 6px 13px;
	border: 1px solid rgba(196, 243, 86, .3);
	border-radius: var(--r-pill);
	background: rgba(196, 243, 86, .08);
	color: var(--g-lime);
	font-family: var(--font-head);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.elogin__eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--g-lime);
	box-shadow: 0 0 0 4px rgba(196, 243, 86, .2);
}

.elogin__lead {
	margin: 0 0 28px;
	color: #fff;
	font-family: var(--font-head);
	font-size: clamp(24px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
}

.elogin .elogin__points {
	display: grid;
	gap: 18px;
	margin: auto 0 0;
	padding: 0;
	list-style: none;
}

.elogin .elogin__point {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
}
.elogin__point-ico {
	display: grid;
	place-items: center;
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: rgba(196, 243, 86, .12);
	color: var(--g-lime);
}
.elogin__point-title {
	display: block;
	margin: 1px 0 2px;
	color: #fff;
	font-family: var(--font-head);
	font-size: 14.5px;
	font-weight: 600;
}
.elogin__point-text {
	display: block;
	color: rgba(255, 255, 255, .66);
	font-size: 13.5px;
	line-height: 1.5;
}


/* ==========================================================================
   Card — form panel
   ========================================================================== */

.elogin__main { padding: clamp(26px, 3.6vw, 44px); }

.elogin__head {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 26px;
}

.elogin__badge {
	display: grid;
	place-items: center;
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 15px;
	background: var(--g-mint);
	color: var(--g-700);
}

.elogin .elogin__title {
	margin: 2px 0 6px;
	font-size: clamp(21px, 2.2vw, 25px);
}

.elogin__text {
	margin: 0;
	color: var(--ink-2);
	font-size: 14.8px;
	line-height: 1.55;
}

/* The token set carries no error surface, so the alert tints are the same
   literals the enquiry and dealer forms use. */
.elogin__alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 22px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 14.4px;
	line-height: 1.5;
}
.elogin__alert p { margin: 0; }
.elogin__alert .bhoo-icon { margin-top: 1px; }
.elogin__alert--bad { border: 1px solid #f0c7cb; background: #fdf2f3; color: #8f2028; }
.elogin__alert--ok { border: 1px solid var(--g-100); background: var(--g-050); color: var(--g-800); }

.elogin__help {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 24px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 13.8px;
	line-height: 1.45;
	text-align: center;
}


/* ==========================================================================
   Card — form
   ========================================================================== */

.lform__field { margin: 0 0 18px; }

.lform__label {
	display: block;
	margin: 0 0 8px;
	color: var(--g-900);
	font-family: var(--font-head);
	font-size: 14px;
	font-weight: 600;
}

.lform__control { position: relative; }

.lform__ico {
	position: absolute;
	top: 50%;
	left: 16px;
	display: grid;
	color: var(--muted);
	transform: translateY(-50%);
	pointer-events: none;
	transition: color .18s;
}
.lform__control:focus-within .lform__ico { color: var(--g-600); }

/* 16px text: anything smaller makes iOS zoom the page when the field is tapped. */
.lform__input {
	display: block;
	width: 100%;
	height: 54px;
	padding: 0 16px 0 48px;
	border: 1.5px solid var(--line);
	border-radius: 14px;
	background: var(--g-025);
	color: var(--ink);
	font: inherit;
	font-size: 16px;
	transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.lform__control--pass .lform__input { padding-right: 56px; }
.lform__input:hover { border-color: var(--g-100); }
.lform__input:focus {
	outline: none;
	border-color: var(--g-400);
	background: var(--white);
	box-shadow: 0 0 0 4px rgba(76, 175, 80, .16);
}
.lform__input[aria-invalid="true"] { border-color: var(--c-red); background: var(--white); }
.lform__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(192, 39, 45, .12); }

/* Browsers paint autofilled fields their own yellow or blue; keep the card's. */
.lform__input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 40px var(--white) inset;
	-webkit-text-fill-color: var(--ink);
}

.lform__toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transform: translateY(-50%);
	transition: color .18s, background-color .18s;
}
.lform__toggle[hidden] { display: none; }
.lform__toggle:hover { color: var(--g-700); background: var(--g-050); }
.lform__toggle .lform__eye,
.lform__toggle .lform__eye-off { display: grid; }
.lform__toggle .lform__eye-off,
.lform__toggle[aria-pressed="true"] .lform__eye { display: none; }
.lform__toggle[aria-pressed="true"] .lform__eye-off { display: grid; }

.lform__err {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 8px 2px 0;
	color: var(--c-red);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
}
.lform__err[hidden] { display: none; }
.lform__err .bhoo-icon { margin-top: 1px; }

.lform__caps {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 2px 0;
	color: var(--c-soil);
	font-size: 13.5px;
	font-weight: 500;
}
.lform__caps:empty { display: none; }
.lform__caps::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--c-gold);
}

.lform__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin: 4px 0 24px;
	font-size: 14.5px;
}

.lform__check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink-2);
	cursor: pointer;
}
.lform__check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--g-600);
	cursor: pointer;
}

.lform__forgot { color: var(--g-700); font-weight: 600; }
.lform__forgot:hover { color: var(--g-600); text-decoration: underline; text-underline-offset: 3px; }

.lform__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 54px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--g-500), var(--g-700));
	box-shadow: 0 8px 20px rgba(35, 128, 63, .26);
	color: var(--white);
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: transform .18s var(--ease), box-shadow .18s, filter .18s;
}
.lform__submit:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(35, 128, 63, .32);
}
.lform__submit:active { transform: none; }
.lform__submit .bhoo-icon { transition: transform .18s var(--ease); }
.lform__submit:hover .bhoo-icon { transform: translateX(3px); }

.lform__spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, .35);
	border-top-color: var(--white);
	border-radius: 50%;
	animation: lform-spin .7s linear infinite;
}
.lform__submit[aria-disabled="true"] { cursor: progress; pointer-events: none; filter: saturate(.8); }
.lform__submit[aria-disabled="true"] .bhoo-icon { display: none; }
.lform__submit[aria-disabled="true"] .lform__spinner { display: block; }

@keyframes lform-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Plugin selects — open state
   The themed menu (main.js, "dropdown menus") takes focus while it is open,
   so the plugin's :focus look would drop away. This holds it, at the plugin's
   own specificity and with its own custom properties, and flips the chevron.
   ========================================================================== */

.evc-app .evc-select select[aria-expanded="true"] {
	border-color: var(--evc-accent-bright);
	background-color: var(--evc-surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323803f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
	box-shadow: var(--evc-ring);
}
.evc-select:has(select[aria-expanded="true"]) .evc-select-icon { color: var(--evc-accent); }


/* ==========================================================================
   Responsive — one block per condition, widest first
   Container queries follow the card's own width (see Sign-in card shell); the
   hero follows the viewport, and stacks at the same 900px the split page hero
   in main.css does.
   ========================================================================== */

@container (max-width: 679px) {
	/* The card's panels stack: the brand panel becomes a short band over the
	   form, and the feature list — useful on a desk, clutter on a phone — goes. */
	.elogin__card { grid-template-columns: 1fr; }
	.elogin__aside { padding: 22px 24px 24px; }
	.elogin__aside::after { width: 150px; right: -24px; bottom: -44px; }
	.elogin__eyebrow { margin-bottom: 10px; }
	.elogin__lead { margin: 0; font-size: 21px; }
	.elogin .elogin__points { display: none; }
}

@container (max-width: 420px) {
	.elogin__main { padding: 22px 18px 20px; }
	.elogin__aside { padding-inline: 18px; }
	.elogin__head { gap: 12px; margin-bottom: 22px; }
	.elogin__badge { width: 44px; height: 44px; border-radius: 13px; }
	.lform__row { margin-bottom: 20px; }
}

@media (max-width: 900px) {
	/* Hero — the artwork stays the section's backdrop rather than becoming a band
	   under the copy, where it read as a second, unrelated picture below the
	   greeting. The copy loses its reserved strip: on a phone it has the width to
	   itself and the scrim is what holds it legible over the artwork.
	   The min-height is not slack: it is what gives the artwork below room to
	   stand at its own height without running out of the top of the section, so
	   it moves with the two values on .chero__art. */
	.chero--art .chero__inner {
		min-height: clamp(430px, 110vw, 640px);
		padding-block: clamp(28px, 5vw, 44px);
		padding-right: var(--gutter);
	}

	

	/* The artwork is sized off the viewport rather than stretched over the hero.
	   object-fit: cover trims it to the box, so a box as tall as the hero would
	   leave a window only ~40% of the artwork wide — all subject, nothing to set
	   the greeting on. At 63vw the window is ~78%, and that is what keeps her
	   clear of the greeting's longest line: she stands in the artwork's right
	   third, so the narrower the window the further left she lands and the
	   sooner the heading runs into her face.
	   Capped at 460px so a tablet does not carry a 600px backdrop. The
	   min-height above has to clear this height plus the inset below, or the
	   artwork runs out of the top of the hero and takes her head with it — the
	   three values move together.
	   The bottom inset sets her down the hero rather than at the top of it, and
	   leaves the pale strip the design closes on, with the points card on it. */
	.chero__art {
		top: auto;
		bottom: clamp(87px, 31vw, 130px);
		height: clamp(210px, 63vw, 460px);
	}

	/* Both edges dissolve into the section's own gradient instead of meeting it
	   at a line — the artwork is a backdrop here, not a panel. Same idiom as the
	   dealer band in main.css.
	   Anchored top rather than the base rule's center: should the box ever come
	   out wider than the artwork, cover trims it vertically, and that trim has to
	   come off the field at her feet, never off her head. */
	.chero__photo {
		object-position: right top;
		-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 88%, transparent 100%);
		mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 88%, transparent 100%);
	}

	/* Steeper and shorter than the wide layout's wash: the copy runs across most
	   of a phone screen, so the scrim has to be clear of the subject by the time
	   it reaches her — past ~64% it is gone and her face is untouched. */
	.chero__scrim {
		background: linear-gradient(100deg, rgba(246, 250, 244, .97) 0%, rgba(246, 250, 244, .90) 26%, rgba(246, 250, 244, .52) 46%, rgba(246, 250, 244, 0) 64%);
	}

	/* Wraps the sentence before it runs into her, as the design sets it. The
	   heading needs no such cap: its longest line stops short of her on its own. */
	.chero__lead {
		max-width: 52%;
		margin-top: clamp(12px, 2.6vw, 18px);
	}

	/* Points — a card at the foot of the hero rather than a bare row. Over the
	   artwork the labels had nothing behind them; on white they hold, and the
	   card gives the hero something to end on. */
	.chero .chero__points {
		flex-wrap: nowrap;
		gap: 0;
		margin-top: clamp(38px, 12vw, 78px);
		padding: clamp(10px, 2.6vw, 14px) clamp(3px, 1vw, 6px);
		border-radius: clamp(16px, 4.5vw, 22px);
		background: var(--white);
		box-shadow: 0 10px 30px rgba(3, 49, 21, .10);
	}
	/* Equal thirds, and min-width: 0 so a long label shrinks its own column
	   instead of pushing the row wider than the card. */
	.chero .chero__point {
		flex: 1 1 0;
		min-width: 0;
		gap: clamp(5px, 1.8vw, 9px);
		padding-inline: clamp(5px, 1.6vw, 10px);
	}
	.chero .chero__point + .chero__point {
		padding-left: clamp(5px, 1.6vw, 10px);
		border-left: 1px solid var(--g-100);
	}
	.chero__point-ico {
		width: clamp(27px, 7.6vw, 38px);
		height: clamp(27px, 7.6vw, 38px);
	}
	/* The 9ch cap is what breaks the label onto two lines on a desk; here the
	   column is already narrower than that, so the cap only gets in the way. */
	.chero__point-label {
		max-width: none;
		font-size: clamp(9.5px, 2.85vw, 13px);
		line-height: 1.25;
	}
}

@media (max-width: 560px) {
	.chero__lead { font-size: 15px; }
	.chero__title {
		max-width: 250px
	}
}

@media (prefers-reduced-motion: reduce) {
	.lform__input,
	.lform__ico,
	.lform__toggle,
	.lform__submit,
	.lform__submit .bhoo-icon { transition: none; }
	.lform__submit:hover,
	.lform__submit:hover .bhoo-icon { transform: none; }
	.lform__spinner { animation-duration: 1.6s; }
}
