/* FQ Menu Options — minimal styles; inherits theme fonts and colours. */
.fqmo-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 1.25em;
	width: 100%;
}

/*
 * Elementor sets form.cart to a no-wrap flex row; give the options their own full-width row
 * so quantity + Add to Cart sit together underneath. !important is needed to beat Elementor's
 * selector. .fqmo-form is added by fqmo.js as a fallback for browsers without :has().
 */
form.cart:has(.fqmo-options),
form.cart.fqmo-form {
	flex-wrap: wrap !important;
	align-items: center;
	gap: 12px;
}

form.cart .fqmo-options {
	flex: 0 0 100% !important;
	width: 100%;
	max-width: 100%;
}

.fqmo-group {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.fqmo-group[hidden] {
	display: none;
}

.fqmo-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Dropdowns (single-choice groups). */
.fqmo-label {
	font-weight: 600;
	padding: 0;
	margin: 0 0 6px;
}

.fqmo-select {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	background-color: #fff;
	color: inherit;
	font: inherit;
}

/* Accordion drawers (multi-select groups). */
.fqmo-drawer {
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	background: #fff;
}

.fqmo-drawer > summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	cursor: pointer;
	list-style: none;
	min-height: 44px;
	box-sizing: border-box;
}

.fqmo-drawer > summary::-webkit-details-marker {
	display: none;
}

.fqmo-drawer > summary::after {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-left: auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	margin-top: -4px;
	transform: rotate(45deg);
	transition: transform 0.15s ease;
	opacity: 0.6;
}

.fqmo-drawer[open] > summary::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.fqmo-drawer > summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 6px;
}

.fqmo-drawer-title {
	font-weight: 600;
	flex: 0 0 auto;
}

.fqmo-drawer-picked {
	flex: 1 1 auto;
	min-width: 0;
	text-align: right;
	font-size: 0.9em;
	opacity: 0.6;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fqmo-drawer-picked.has-picks {
	opacity: 0.9;
}

.fqmo-drawer-body {
	padding: 4px 14px 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.fqmo-group.has-error .fqmo-drawer {
	border-color: #d63638;
}

.fqmo-error {
	color: #d63638;
	font-size: 0.9em;
	margin: 0.6em 0 0;
}

/* Choices inside drawers, and the toggle. */
.fqmo-choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: 0 1em;
	padding-top: 8px;
}

.fqmo-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	cursor: pointer;
	line-height: 1.4;
	padding: 0.35em 0;
}

.fqmo-choice input {
	margin: 0.25em 0 0;
	flex: 0 0 auto;
}

.fqmo-choice.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.fqmo-help {
	font-size: 0.9em;
	opacity: 0.75;
	margin: 0.6em 0 0;
}

.fqmo-total {
	font-weight: 600;
	font-size: 1.1em;
	margin: 0;
}

@media (max-width: 480px) {
	.fqmo-choices {
		grid-template-columns: 1fr;
	}

	.fqmo-drawer > summary {
		flex-wrap: wrap;
		gap: 2px 12px;
	}

	.fqmo-drawer-picked {
		order: 3;
		flex-basis: 100%;
		text-align: left;
	}
}
