/*
 * Shared marketing event-search component (parts/event-search.php).
 *
 * Matches the ad-landing reference treatment (teal #67c6b4, search icon),
 * rendered as a joined pill: input rounded on the left, button rounded on the
 * right, same height, constrained width, centered. Rules are scoped under
 * .m4ts-search and target the #selectevent / #selectevent-hero ids so they
 * beat the legacy per-context input#selectevent rules without !important.
 */

.m4ts-search {
	max-width: 560px;
	margin: 24px auto 0;
	width: 100%;
}

.m4ts-search__row {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
}

/* Input — left half of the pill. */
.m4ts-search #selectevent,
.m4ts-search #selectevent-hero {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;            /* override legacy width:100% */
	height: 44px;
	box-sizing: border-box;
	margin: 0;
	padding: 0 16px;
	font-size: 16px;
	line-height: normal;
	color: #333;
	background: #fff;
	border: 2px solid #67c6b4;
	border-right: 0;
	border-radius: 8px 0 0 8px;
	outline: none;
	box-shadow: none;
	cursor: text;
}

.m4ts-search #selectevent:focus,
.m4ts-search #selectevent-hero:focus {
	border-color: #67c6b4;
	box-shadow: 0 0 0 3px rgba(103, 198, 180, .25);
}

.m4ts-search #selectevent::placeholder,
.m4ts-search #selectevent-hero::placeholder {
	color: #888;
	opacity: 1;
}

/* Button — right half of the pill, solid teal, with the search icon. */
.m4ts-search #searcheventbutton,
.m4ts-search #searcheventbutton-hero {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	box-sizing: border-box;
	margin: 0;
	padding: 0 22px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #67c6b4;
	border: 2px solid #67c6b4;
	border-left: 0;
	border-radius: 0 8px 8px 0;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
	transition: background-color .2s ease;
}

.m4ts-search #searcheventbutton:hover,
.m4ts-search #searcheventbutton-hero:hover,
.m4ts-search #searcheventbutton:focus-visible,
.m4ts-search #searcheventbutton-hero:focus-visible {
	background: #78d4c2;
	color: #fff;
	outline: none;
}

.m4ts-search__icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* Hint — sits over hero imagery on every surface, so white reads cleanly. */
.m4ts-search__hint {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #fff;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.m4ts-search__hint .m4ts-search__link {
	color: #fff;
	text-decoration: underline;
	cursor: pointer;
}

.m4ts-search__hint .m4ts-search__link:hover {
	color: #eaf7f3;
}

/* The homepage hero is left-aligned (headline/subheading flush left in the
   column), so the search box + stats strip must be flush left too — not
   centered like the city/role/find-talent heroes (which keep margin:auto). */
.home .m4ts-search,
.home .m4ts-hero-stats {
	margin-left: 0;
	margin-right: 0;
}

/* Homepage hero search sits in a light/white content column (the hero image is
   a separate right column), so white hint text would wash out. Use dark text +
   a teal link there. City/role/find-talent heroes are dark images, so they keep
   the white default above. */
.home .m4ts-search__hint {
	color: #4a4a4a;
	text-shadow: none;
	text-align: left;
}
.home .m4ts-search__hint .m4ts-search__link {
	color: #2a9d8a;
}
.home .m4ts-search__hint .m4ts-search__link:hover {
	color: #67c6b4;
}

/* Homepage hero stats strip — sits below the search box hint. Aligns to the
   same 560px column as the search row; dark text for the light hero column. */
.m4ts-hero-stats {
	display: flex;
	gap: 36px;
	max-width: 560px;
	margin: 22px auto 0;
	padding-top: 18px;
	border-top: 1px solid rgba(0, 0, 0, .12);
}
.m4ts-hero-stat {
	display: flex;
	flex-direction: column;
}
.m4ts-hero-stat__num {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.05;
	color: #2f3e46;
}
.m4ts-hero-stat__label {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.3;
	color: #6a7378;
}
@media (max-width: 520px) {
	.m4ts-hero-stats { gap: 20px; }
	.m4ts-hero-stat__num { font-size: 24px; }
}

/* Stack on very narrow screens so neither half gets crushed. */
@media (max-width: 520px) {
	.m4ts-search__row {
		flex-wrap: wrap;
	}
	.m4ts-search #selectevent,
	.m4ts-search #selectevent-hero {
		flex: 1 1 100%;
		border-right: 2px solid #67c6b4;
		border-radius: 8px;
	}
	.m4ts-search #searcheventbutton,
	.m4ts-search #searcheventbutton-hero {
		flex: 1 1 100%;
		border-left: 2px solid #67c6b4;
		border-radius: 8px;
		margin-top: 8px;
	}
}
