/* Mynestride conversion and mobile overrides.
 * Loaded after the established clean-front stylesheet so production visual
 * history remains intact while product and contact flows get scoped fixes. */

.contact-optional-details {
	border: 1px solid #dce5ea;
	border-radius: 16px;
	background: #f8fbfc;
}

.contact-optional-details > summary {
	display: flex;
	min-height: 56px;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	padding: 14px 18px;
	cursor: pointer;
}

.contact-optional-details > summary strong {
	color: #17324a;
	font-size: 15px;
}

.contact-optional-details > summary span {
	color: #637482;
	font-size: 12px;
	line-height: 1.45;
}

.contact-optional-details[open] > summary {
	border-bottom: 1px solid #dce5ea;
}

.contact-request-change {
	grid-column: 1 / -1;
	border: 1px solid #dfe7ea;
	border-radius: 12px;
	background: #f8fbfc;
}

.contact-request-change > summary {
	display: flex;
	min-height: 44px;
	align-items: center;
	padding: 11px 14px;
	font-weight: 700;
	cursor: pointer;
}

.contact-request-fields {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.contact-request-change .contact-request-fields {
	padding: 0 14px 14px;
}

[data-contact-error-summary]:focus {
	outline: 3px solid #1f6f8b;
	outline-offset: 3px;
}

.contact-optional-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	padding: 18px;
}

.contact-optional-grid .contact-form-field {
	min-width: 0;
}

.contact-optional-grid .contact-field--full {
	grid-column: 1 / -1;
}

.contact-optional-grid .contact-field-help {
	margin: 6px 0 0;
	color: #637482;
	font-size: 12px;
	line-height: 1.45;
}

.contact-form-shell input,
.contact-form-shell select,
.contact-form-shell button,
.contact-form-shell summary {
	min-height: 44px;
}

.mynestride-human-challenge {
	margin-top: 16px;
	padding: 18px;
	border: 1px solid #cbdde5;
	border-radius: 14px;
	background: #f5fafc;
}

.mynestride-human-challenge h2 {
	margin: 0 0 8px;
	color: #17324a;
	font-size: 18px;
}

.mynestride-human-challenge p {
	margin: 6px 0;
	color: #465d6b;
	line-height: 1.5;
}

.mynestride-human-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.mynestride-human-options button {
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid #b9ccd5;
	border-radius: 9px;
	background: #fff;
	color: #17324a;
	cursor: pointer;
}

.mynestride-human-options [data-human-option] {
	font-size: 20px;
}

.mynestride-human-options [data-human-option][aria-pressed="true"] {
	border-color: #1f6f8b;
	background: #dff2f7;
	box-shadow: inset 0 0 0 1px #1f6f8b;
}

.mynestride-human-challenge fieldset {
	margin-top: 12px;
	padding: 12px;
	border: 1px solid #cbdde5;
	border-radius: 9px;
}

.mynestride-human-challenge fieldset label {
	display: block;
	margin-top: 8px;
}

@media (max-width: 900px) {
	body.mynestride-product-single,
	body.mynestride-contact {
		overflow-x: clip;
	}

	body.mynestride-product-single .detail {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	body.mynestride-product-single .detail-stack {
		display: contents;
	}

	body.mynestride-product-single .detail-media {
		order: 1;
		width: 100%;
		min-width: 0;
		min-height: 0;
		padding: 12px;
		aspect-ratio: 4 / 3;
	}

	body.mynestride-product-single .detail-copy {
		order: 2;
		position: static;
		min-width: 0;
		padding: 16px;
	}

	body.mynestride-product-single .gallery-shell {
		order: 3;
		min-width: 0;
		overflow: hidden;
		padding: 14px;
	}

	body.mynestride-product-single .gallery-grid {
		display: grid;
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(96px, 28vw);
		gap: 12px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
		padding-bottom: 8px;
		-webkit-overflow-scrolling: touch;
	}

	body.mynestride-product-single .gallery-item {
		scroll-snap-align: start;
	}

	body.mynestride-product-single .detail-media img,
	body.mynestride-product-single .gallery-item img {
		max-width: 100%;
		height: auto;
	}

}

@media (max-width: 700px) {
	.contact-request-fields {
		grid-template-columns: 1fr;
	}

	.contact-optional-grid {
		grid-template-columns: 1fr;
	}

	.contact-optional-grid .contact-field--full {
		grid-column: auto;
	}
}

@media (pointer: coarse) {
	.contact-form-shell a,
	.contact-form-shell button,
	.contact-form-shell input,
	.contact-form-shell select,
	.contact-form-shell summary,
	body.mynestride-product-single .product-actions a,
	body.mynestride-product-single .product-actions button {
		min-height: 44px;
	}
}
