/*
 * Strikers theme: Request form fields. Split out of style.css (STR-185, speed) so other pages
 * don't download it. Loaded after style.css only where it is used:
 *   /proshop/ and every Jobs screen (the Apply form and job filters reuse these field rules)
 * (functions.php strikers_enqueue_page_styles).
 * Same rules as style.css: theme.json tokens only, no colors or sizes here.
 */

/* ---- Request a service: [strikers_proshop_form] ----
   One column, labels above, 48px fields with 17px text (no zoom on iPhone). Fields are the
   zone's surface (white on F5F5F7) with a 1px 6E6E73 edge (4.66:1 against F5F5F7, 5.07:1
   against white; 3:1 needed); hover and focus darken it to ink, focus adds the blue ring.
   Errors are never red (brand guide: red means book): an ink 2px rule beside the field, a 2px
   ink edge, and the message in semibold ink, plus the alert above the form. ---- */
.strikers-proshop-request h2 {
	margin: 0;
}

.strikers-form {
	display: grid;
	gap: var(--wp--preset--spacing--6);
	margin: 0;
	position: relative;
}

.strikers-field {
	display: grid;
	gap: var(--wp--preset--spacing--2);
	margin: 0;
}

.strikers-field > label {
	color: var(--wp--preset--color--ink-dark);
	font-size: var(--wp--preset--font-size--body);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: var(--wp--custom--line-height--body);
}

.strikers-field-optional {
	color: var(--wp--preset--color--ink-muted-dark);
	font-weight: var(--wp--custom--font-weight--regular);
}

.strikers-field :is(input, select, textarea),
.strikers-jobs-main :where(.awsm-job-form-group :is(input[type="text"], input[type="email"], input[type="tel"], textarea), .awsm-b-job-search, .awsm-job-search, .awsm-b-filter-item > select, .awsm-filter-item > select) {
	appearance: none;
	background-color: var(--wp--preset--color--surface-dark);
	border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--ink-muted-dark);
	border-radius: var(--wp--custom--radius--sm);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink-dark);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--body);
	margin: 0;
	min-height: calc(var(--wp--custom--tap-target) + var(--wp--preset--spacing--1));
	padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--4);
	width: 100%;
}

.strikers-field textarea,
.strikers-jobs-main .awsm-job-form-group textarea {
	min-height: calc(3 * var(--wp--custom--tap-target));
	resize: vertical;
}

.strikers-field :is(input, select, textarea):hover,
.strikers-field :is(input, select, textarea):focus,
.strikers-jobs-main :is(.awsm-job-form-control, .awsm-b-job-search, .awsm-job-search, .awsm-b-filter-item > select, .awsm-filter-item > select):is(:hover, :focus) {
	border-color: var(--wp--preset--color--ink-dark);
}

/* Select: native control, own chevron (2px ink strokes) on the wrapper; the control keeps
   room for it on the right. */
.strikers-select,
.strikers-jobs-main :is(.awsm-b-filter-item, .awsm-filter-item) {
	display: block;
	position: relative;
}

.strikers-select::after,
.strikers-jobs-main :is(.awsm-b-filter-item, .awsm-filter-item):has(> select)::after {
	border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--ink-dark);
	border-right: var(--wp--custom--border--width) solid var(--wp--preset--color--ink-dark);
	content: "";
	height: var(--wp--preset--spacing--2);
	pointer-events: none;
	position: absolute;
	right: var(--wp--preset--spacing--4);
	top: 50%;
	transform: translateY(-75%) rotate(45deg);
	width: var(--wp--preset--spacing--2);
}

.strikers-select > select,
.strikers-jobs-main :is(.awsm-b-filter-item, .awsm-filter-item) > select {
	cursor: pointer;
	padding-right: calc(var(--wp--preset--spacing--4) + var(--wp--preset--spacing--6));
}

/* Invalid field: ink rule on the left, 2px ink edge, message under the control. */
.strikers-field.is-invalid {
	border-left: var(--wp--custom--border--width) solid var(--wp--preset--color--ink-dark);
	padding-left: var(--wp--preset--spacing--4);
}

.strikers-field.is-invalid :is(input, select, textarea) {
	border-color: var(--wp--preset--color--ink-dark);
	border-width: var(--wp--custom--border--width);
}

.strikers-field-error {
	color: var(--wp--preset--color--ink-dark);
	font-weight: var(--wp--custom--font-weight--semibold);
	margin: 0;
}

/* Alerts: error summary (2px ink edge) and the sent message (2px blue edge, 0000F9 8.14:1 on
   F5F5F7), on the field surface, radius md. Error links are 44px rows. */
.strikers-form-alert {
	background-color: var(--wp--preset--color--surface-dark);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--ink-dark);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink-dark);
	margin: 0 0 var(--wp--preset--spacing--6);
	padding: var(--wp--preset--spacing--6);
}

.strikers-form-alert.is-success {
	border-color: var(--wp--preset--color--blue-text-dark);
	margin-bottom: 0;
}

.strikers-form-alert > * {
	margin: 0;
}

.strikers-form-alert > * + * {
	margin-top: var(--wp--preset--spacing--2);
}

.strikers-form-alert > .strikers-form-alert-title {
	font-size: var(--wp--preset--font-size--h-3);
	line-height: var(--wp--custom--line-height--h-3);
}

.strikers-form-alert ul {
	padding-left: var(--wp--preset--spacing--4);
}

.strikers-form-alert li a {
	align-items: center;
	display: inline-flex;
	font-weight: var(--wp--custom--font-weight--semibold);
	min-height: var(--wp--custom--tap-target);
}

/* The alert takes focus from the URL fragment (tabindex -1): no ring for that, the 2px edge
   already marks it. */
.strikers-form-alert:focus {
	box-shadow: none;
	outline: none;
}

/* Honeypot: off screen for people, still in the form for bots (not display:none). */
.strikers-hp {
	height: 1px;
	left: -100vw;
	overflow: hidden;
	position: absolute;
	top: 0;
	width: 1px;
}

/* Send Request: the ink pill (style.css "Ink pill"), a real <button>. Full width on phones
   (thumb reach), its own width from 600px. Disabled (optional JS, while sending): white on
   6E6E73 5.07:1, no hover. */
.strikers-form-actions {
	margin: 0;
}

.wp-block-buttons > .wp-block-button.strikers-btn-ink > button.wp-block-button__link {
	cursor: pointer;
}

.wp-block-buttons > .wp-block-button.strikers-btn-ink > .wp-block-button__link:is(:disabled, [aria-disabled="true"]) {
	background-color: var(--wp--preset--color--ink-muted-dark);
	border-color: var(--wp--preset--color--ink-muted-dark);
	cursor: not-allowed;
	text-decoration: none;
}

@media (max-width: 599.98px) {
	.strikers-form-actions > .wp-block-button {
		flex: 1 1 100%;
	}

	.strikers-form-actions .wp-block-button__link {
		width: 100%;
	}
}

/* Phone and email beside the form: muted caption label (6E6E73 4.66:1 on F5F5F7), the value as
   an outline pill (2px ink edge, ink label 15.46:1), 44px; hover fills ink, white label. */
.strikers-reach-item > *,
.strikers-reach-item p {
	margin: 0;
}

.strikers-reach-label {
	color: var(--wp--preset--color--ink-muted-dark);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: var(--wp--custom--line-height--caption);
}

.strikers-reach-item a {
	align-items: center;
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--ink-dark);
	border-radius: var(--wp--custom--radius--pill);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink-dark);
	display: inline-flex;
	font-weight: var(--wp--custom--font-weight--semibold);
	max-width: 100%;
	min-height: var(--wp--custom--tap-target);
	overflow-wrap: anywhere;
	padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--6);
	text-decoration: none;
}

.strikers-reach-item a:hover,
.strikers-reach-item a:active {
	background-color: var(--wp--preset--color--ink-dark);
	color: var(--wp--preset--color--surface-dark);
	text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
	.strikers-reach-item a,
	.strikers-field :is(input, select, textarea),
	.strikers-jobs-main :is(.awsm-job-form-control, .awsm-b-job-search, .awsm-job-search, .awsm-b-filter-item > select, .awsm-filter-item > select) {
		transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	}
}
