/**
 * Parts Reorder scan landing page.
 *
 * Mobile-first: the visitor is on a phone, in a mechanical room, possibly in
 * gloves. Fields stay full width and tall enough to tap; the send button is
 * mirrored in a sticky bar so it is never out of reach.
 *
 * Every Gravity Forms selector below is !important on purpose - GF 2.5+ ships
 * the Orbital framework stylesheet at very high specificity and silently wins
 * otherwise. See functions/parts-scan.php.
 */

:root {
	--dc-red: #DB1E34;
	--dc-red-dark: #A9142A;
	--dc-grey: #C7C8CA;
	--dc-ink: #16191D;
	--dc-muted: #5C6470;
	--dc-line: #DDE0E4;
	--dc-bg: #F4F5F7;
	--dc-ok: #0F7B3F;
	--dc-ok-bg: #EAF6EE;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body.dc-scan-body {
	margin: 0;
	padding: 0;
	background: var(--dc-bg);
	color: var(--dc-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.45;
	/* Room for the sticky send bar. */
	padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

.dc-scan {
	max-width: 560px;
	margin: 0 auto;
	padding: 14px 16px 0;
}

/* ---------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */

.dc-scan-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.dc-scan-logo img {
	display: block;
	width: auto;
	height: 54px;
}

.dc-scan-wordmark {
	font-weight: 800;
	font-size: 17px;
	color: var(--dc-ink);
	text-decoration: none;
	letter-spacing: -.01em;
}

.dc-scan-callus {
	text-align: right;
	text-decoration: none;
	color: var(--dc-muted);
	font-size: 11px;
	line-height: 1.25;
	flex: 0 0 auto;
}

.dc-scan-callus span {
	display: block;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.dc-scan-callus strong {
	display: block;
	font-size: 15px;
	color: var(--dc-red);
	white-space: nowrap;
}

.dc-scan-title {
	font-size: 26px;
	line-height: 1.15;
	margin: 0 0 12px;
	letter-spacing: -.02em;
}

/* ---------------------------------------------------------------------
 * "We already know your equipment" card - the whole point of the page
 * ------------------------------------------------------------------ */

.dc-scan-card {
	background: var(--dc-ok-bg);
	border: 1px solid #BFE3CC;
	border-left: 5px solid var(--dc-ok);
	border-radius: 8px;
	padding: 13px 15px;
	margin: 0 0 16px;
}

.dc-scan-card--warn {
	background: #FFF7E6;
	border-color: #F0DDB0;
	border-left-color: #D98500;
}

.dc-scan-card-title {
	margin: 0 0 9px;
	font-weight: 700;
	font-size: 14.5px;
	line-height: 1.3;
	color: var(--dc-ok);
}

.dc-scan-card--warn .dc-scan-card-title {
	color: #8A5A00;
}

.dc-scan-check {
	display: inline-block;
	margin-right: 4px;
	font-weight: 700;
}

.dc-scan-card-body {
	margin: 0;
	font-size: 14px;
	color: var(--dc-ink);
}

.dc-scan-specs {
	margin: 0;
	display: grid;
	gap: 5px;
}

.dc-scan-specs > div {
	display: flex;
	gap: 10px;
	align-items: baseline;
}

.dc-scan-specs dt {
	flex: 0 0 68px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--dc-muted);
}

.dc-scan-specs dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.3;
	min-width: 0;
	word-break: break-word;
}

.dc-scan-card-foot {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--dc-muted);
}

/* ---------------------------------------------------------------------
 * Gravity Forms overrides - !important throughout, see file header
 * ------------------------------------------------------------------ */

.dc-scan-form .gform_wrapper {
	margin: 0 !important;
	padding: 0 !important;
}

.dc-scan-form .gform_wrapper form,
.dc-scan-form .gform_wrapper .gform_body {
	margin: 0 !important;
	padding: 0 !important;
}

.dc-scan-form .gform_wrapper .gform_fields {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 11px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.dc-scan-form .gform_wrapper .gfield {
	grid-column: 1 / -1 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Invisible captcha must not reserve space above the send button. */
.dc-scan-form .gform_wrapper .gfield--type-captcha,
.dc-scan-form .gform_wrapper .gform_validation_container {
	display: none !important;
}

.dc-scan-form .gform_wrapper .gfield_label,
.dc-scan-form .gform_wrapper legend.gfield_label {
	display: block !important;
	font-size: 11.5px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: .06em !important;
	color: var(--dc-muted) !important;
	margin: 0 0 4px !important;
	padding: 0 !important;
}

.dc-scan-form .gform_wrapper .gfield_required {
	color: var(--dc-red) !important;
	margin-left: 2px !important;
}

.dc-scan-form .gform_wrapper .gfield_description {
	font-size: 12.5px !important;
	color: var(--dc-muted) !important;
	padding: 4px 0 0 !important;
	margin: 0 !important;
}

/* 16px minimum or iOS Safari zooms the viewport on focus and throws the
   customer off the fold. */
.dc-scan-form .gform_wrapper input[type="text"],
.dc-scan-form .gform_wrapper input[type="email"],
.dc-scan-form .gform_wrapper input[type="tel"],
.dc-scan-form .gform_wrapper input[type="number"],
.dc-scan-form .gform_wrapper textarea,
.dc-scan-form .gform_wrapper select {
	width: 100% !important;
	max-width: 100% !important;
	font-size: 16px !important;
	font-family: inherit !important;
	line-height: 1.35 !important;
	color: var(--dc-ink) !important;
	background: #fff !important;
	border: 1.5px solid var(--dc-line) !important;
	border-radius: 7px !important;
	padding: 11px 12px !important;
	margin: 0 !important;
	box-shadow: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	min-height: 46px !important;
}

/* GF emits rows="10" - left alone the notes box eats the whole screen and
   pushes send far below the fold. Fixed height, still user-resizable. */
.dc-scan-form .gform_wrapper textarea {
	height: 84px !important;
	min-height: 84px !important;
	resize: vertical !important;
}

.dc-scan-form .gform_wrapper input:focus,
.dc-scan-form .gform_wrapper textarea:focus,
.dc-scan-form .gform_wrapper select:focus {
	outline: none !important;
	border-color: var(--dc-red) !important;
	box-shadow: 0 0 0 3px rgba(219, 30, 52, .16) !important;
}

.dc-scan-form .gform_wrapper .gfield.dc-scan-qty input {
	max-width: 120px !important;
}

/* --- Submit --- */

.dc-scan-form .gform_wrapper .gform_footer {
	margin: 16px 0 0 !important;
	padding: 0 !important;
	display: block !important;
}

.dc-scan-form .gform_wrapper .gform_footer input[type="submit"],
.dc-scan-form .gform_wrapper .gform_footer button[type="submit"],
.dc-scan-form .gform_wrapper .gform_button {
	display: block !important;
	width: 100% !important;
	background: var(--dc-red) !important;
	border: 0 !important;
	border-radius: 8px !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	letter-spacing: .01em !important;
	padding: 15px 20px !important;
	margin: 0 !important;
	min-height: 52px !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-transform: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.dc-scan-form .gform_wrapper .gform_footer input[type="submit"]:hover,
.dc-scan-form .gform_wrapper .gform_footer button[type="submit"]:hover {
	background: var(--dc-red-dark) !important;
}

/* --- Validation + confirmation --- */

.dc-scan-form .gform_wrapper .gform_validation_errors {
	background: #FDECEE !important;
	border: 1px solid #F3C2C8 !important;
	border-left: 5px solid var(--dc-red) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	padding: 12px 15px !important;
	margin: 0 0 14px !important;
}

.dc-scan-form .gform_wrapper .gform_validation_errors > h2 {
	font-size: 14.5px !important;
	color: var(--dc-red-dark) !important;
	margin: 0 !important;
	padding: 0 !important;
	font-weight: 700 !important;
}

.dc-scan-form .gform_wrapper .validation_message {
	background: transparent !important;
	border: 0 !important;
	color: var(--dc-red-dark) !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	padding: 5px 0 0 !important;
	margin: 0 !important;
}

.dc-scan-form .gform_wrapper .gfield_error input,
.dc-scan-form .gform_wrapper .gfield_error textarea {
	border-color: var(--dc-red) !important;
	background: #FFFBFB !important;
}

.dc-scan-form .gform_confirmation_message {
	background: #fff !important;
	border: 1px solid var(--dc-line) !important;
	border-left: 5px solid var(--dc-ok) !important;
	border-radius: 8px !important;
	padding: 22px !important;
	font-size: 15.5px !important;
}

.dc-scan-form .gform_confirmation_message h2 {
	margin: 0 0 8px !important;
	font-size: 20px !important;
	color: var(--dc-ok) !important;
}

.dc-scan-form .gform_confirmation_message p {
	margin: 0 !important;
}

/* ---------------------------------------------------------------------
 * Sticky send bar
 * ------------------------------------------------------------------ */

.dc-scan-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(6px);
	border-top: 1px solid var(--dc-line);
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}

.dc-scan-sticky[hidden] {
	display: none;
}

.dc-scan-sticky-btn {
	display: block;
	width: 100%;
	max-width: 528px;
	margin: 0 auto;
	background: var(--dc-red);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	padding: 15px 20px;
	min-height: 52px;
	cursor: pointer;
}

.dc-scan-sticky-btn:hover {
	background: var(--dc-red-dark);
}

/* ---------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------ */

.dc-scan-foot {
	margin: 26px 0 0;
	padding: 16px 0 24px;
	border-top: 1px solid var(--dc-line);
	font-size: 13px;
	color: var(--dc-muted);
}

.dc-scan-foot p {
	margin: 0 0 6px;
}

.dc-scan-foot a {
	color: var(--dc-red);
}

/* ---------------------------------------------------------------------
 * Wider screens - pair the short fields once there is genuinely room.
 * Deliberately NOT done on phones: two narrow inputs side by side is a
 * worse target for someone wearing gloves.
 * ------------------------------------------------------------------ */

@media screen and (min-width: 600px) {
	.dc-scan {
		padding-top: 28px;
	}

	.dc-scan-title {
		font-size: 30px;
	}

	.dc-scan-form .gform_wrapper .gform_fields {
		grid-template-columns: 1fr 1fr !important;
		gap: 13px !important;
	}

	.dc-scan-form .gform_wrapper .gfield.dc-scan-half {
		grid-column: span 1 !important;
	}

	.dc-scan-form .gform_wrapper .gform_footer input[type="submit"],
	.dc-scan-form .gform_wrapper .gform_footer button[type="submit"] {
		width: auto !important;
		min-width: 280px !important;
	}
}
