/* Store selector — tokens: _bmad-output/specs/spec-store-selector/design-tokens.md */
.mf-store-selector {
	position: relative;
	display: inline-block;
	font-family: Poppins, Helvetica, Arial, sans-serif;
	line-height: 1.15;
	text-align: left;
}

.mf-store-selector__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 16px;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .55);
	color: #fff;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.mf-store-selector__toggle::-webkit-details-marker {
	display: none;
}

.mf-store-selector__toggle:hover {
	background: rgba(255, 255, 255, .24);
}

.mf-store-selector__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.mf-store-selector__label {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.mf-store-selector__eyebrow {
	font-size: 10px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	opacity: .9;
}

.mf-store-selector__current {
	font-size: 14px;
	font-weight: 600;
}

.mf-store-selector__icon,
.mf-store-selector__chevron {
	flex: none;
}

.mf-store-selector[open] .mf-store-selector__chevron {
	transform: rotate(180deg);
}

.mf-store-selector__panel {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 9999;
	width: 340px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-top: 4px solid #a4115b;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
	color: #232323;
}

.mf-store-selector .mf-store-selector__heading {
	margin: 0;
	padding: 14px 18px 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #5c5c5c;
}

.mf-store-selector .mf-store-selector__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-store-selector .mf-store-selector__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-store-selector__store {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 60px;
	padding: 10px 18px;
	color: #951162;
	text-decoration: none;
}

a.mf-store-selector__store:hover,
a.mf-store-selector__store:focus-visible {
	background: #f4f4f4;
}

.mf-store-selector__store.is-current {
	background: #fbeef4;
}

.mf-store-selector__store-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mf-store-selector__store-name {
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #232323;
}

.mf-store-selector__store-url {
	font-size: 12px;
	color: #5c5c5c;
	overflow-wrap: anywhere;
}

.mf-store-selector__badge {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #951162;
}

.mf-store-selector .mf-store-selector__note {
	margin: 0;
	padding: 12px 18px 16px;
	border-top: 1px solid #d9d9d9;
	font-size: 12px;
	line-height: 1.5;
	color: #5c5c5c;
}

/* Desktop: compact one-line button in the top bar, beside the social icons. */
@media (min-width: 981px) {
	.mf-store-selector__toggle {
		white-space: nowrap;
		min-height: 32px;
		padding: 0 12px;
		gap: 8px;
	}

	.mf-store-selector__label {
		flex-direction: row;
		align-items: baseline;
		gap: 4px;
	}

	.mf-store-selector__current {
		font-size: 13px;
	}

	.mf-store-selector__icon {
		width: 16px;
		height: 16px;
	}

	.mf-store-selector__panel {
		left: auto;
		right: 0;
	}
}

/* Touch screens at desktop width keep the 44px target. */
@media (min-width: 981px) and (pointer: coarse) {
	.mf-store-selector__toggle {
		min-height: 44px;
	}
}

/* Phone: full-width black bar inside the mobile search module. */
@media (max-width: 767px) {
	.mf-store-selector {
		display: block;
		margin-bottom: 10px;
	}

	.mf-store-selector__toggle {
		background: #000;
		border-color: #000;
	}

	.mf-store-selector__toggle:hover {
		background: #000;
	}

	.mf-store-selector__chevron {
		margin-left: auto;
	}

	.mf-store-selector__panel {
		top: 100%;
		width: 100%;
		max-width: none;
	}
}

/* Divi paints later header rows over earlier ones: lift the row holding an open selector. */
.et_pb_row:has(.mf-store-selector[open]) {
	position: relative;
	z-index: 100;
}

/* Top bar: keep the social icons in one row beside the selector. */
.et_pb_column:has(> .et_pb_code .mf-store-selector) > .et_pb_social_media_follow {
	flex: none;
	margin-bottom: 0;
}

/* Top bar (desktop): the 1/4 column is too narrow for selector + icons; let the text column give way. */
@media (min-width: 981px) {
	.et_pb_row:has(> .et_pb_column > .et_pb_code .mf-store-selector) {
		display: flex;
		align-items: center;
	}

	.et_pb_row:has(> .et_pb_column > .et_pb_code .mf-store-selector) > .et_pb_column:first-child {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0;
		margin-right: 24px !important;
	}

	.et_pb_column:has(> .et_pb_code .mf-store-selector) {
		flex: none;
		width: auto !important;
		margin-right: 0 !important;
	}

	/* Visually hidden, kept for screen readers. */
	.mf-store-selector__eyebrow {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* First-visit store modal (native <dialog>). Desktop: centered card; phone: bottom sheet. */
html:has(.mf-store-modal[open]),
html:has(.mf-store-confirm[open]) {
	overflow: hidden;
}

.mf-store-modal {
	width: 720px;
	max-width: calc(100% - 32px);
	max-height: calc(100% - 32px);
	padding: 0;
	border: 0;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	color: #232323;
	font-family: Poppins, Helvetica, Arial, sans-serif;
	overflow: auto;
}

.mf-store-modal::backdrop {
	background: rgba(35, 35, 35, .72);
}

.mf-store-modal__brand {
	display: flex;
	justify-content: center;
	padding: 28px 40px;
	border-bottom: 1px solid #d9d9d9;
}

.mf-store-modal__brand img {
	display: block;
	width: 220px;
	max-width: 100%;
	height: auto;
}

.mf-store-modal__brand-text {
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 24px;
	font-weight: 700;
	color: #951162;
}

.mf-store-modal__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 36px 40px 40px;
	text-align: center;
}

.mf-store-modal .mf-store-modal__title {
	margin: 0;
	padding: 0;
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: #232323;
}

.mf-store-modal .mf-store-modal__text {
	margin: -16px 0 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #5c5c5c;
}

.mf-store-modal__stores {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.mf-store-modal__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.mf-store-modal__store {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 160px;
	padding: 28px 20px;
	background: #fff;
	border: 2px solid #d9d9d9;
	color: #951162;
	cursor: pointer;
}

.mf-store-modal__store:hover {
	border-color: #a4115b;
}

.mf-store-modal__store:has(input:checked) {
	background: #fbeef4;
	border-color: #a4115b;
}

.mf-store-modal__store:has(input:focus-visible) {
	outline: 2px solid #232323;
	outline-offset: 2px;
}

/* Radio stays focusable for arrow-key selection; the card shows its state. */
.mf-store-modal__store input {
	position: absolute;
	opacity: 0;
	margin: 0;
	pointer-events: none;
}

.mf-store-modal__store svg {
	flex: none;
}

.mf-store-modal__store-name {
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: #232323;
}

.mf-store-modal .mf-store-modal__cta {
	align-self: center;
	min-width: 260px;
	min-height: 52px;
	margin: 0;
	padding: 0 30px;
	border: 0;
	border-radius: 0;
	background: #a4115b;
	color: #fff;
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
}

.mf-store-modal .mf-store-modal__cta:hover {
	background: #000;
}

.mf-store-modal .mf-store-modal__cta:focus-visible {
	outline: 2px solid #232323;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.mf-store-modal {
		width: 100%;
		max-width: 100%;
		max-height: 100%;
		margin: auto 0 0;
		box-shadow: 0 -12px 40px rgba(0, 0, 0, .3);
	}

	.mf-store-modal__brand {
		padding: 20px 16px;
	}

	.mf-store-modal__brand img {
		width: 170px;
	}

	.mf-store-modal__body {
		gap: 20px;
		padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
		text-align: left;
	}

	.mf-store-modal .mf-store-modal__title {
		font-size: 24px;
	}

	.mf-store-modal .mf-store-modal__text {
		margin-top: -12px;
		font-size: 14px;
	}

	.mf-store-modal__hint {
		display: none;
	}

	.mf-store-modal__stores {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.mf-store-modal__store {
		flex-direction: row;
		justify-content: flex-start;
		gap: 14px;
		min-height: 72px;
		padding: 14px 16px;
	}

	.mf-store-modal__store svg {
		width: 26px;
		height: 26px;
	}

	.mf-store-modal__store-name {
		font-size: 17px;
	}

	.mf-store-modal .mf-store-modal__cta {
		align-self: stretch;
		min-width: 0;
	}
}

/* Store link / modal CTA while the cart count loads. */
.mf-store-selector__store[aria-busy="true"],
.mf-store-modal .mf-store-modal__cta[aria-busy="true"] {
	cursor: progress;
	opacity: .7;
}

/* Switch confirmation (native <dialog>). Desktop: 520px card; phone: bottom sheet. */
.mf-store-confirm {
	width: 520px;
	max-width: calc(100% - 32px);
	max-height: calc(100% - 32px);
	padding: 0;
	border: 0;
	border-top: 4px solid #a4115b;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	color: #232323;
	font-family: Poppins, Helvetica, Arial, sans-serif;
	overflow: auto;
}

.mf-store-confirm::backdrop {
	background: rgba(35, 35, 35, .72);
}

.mf-store-confirm__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px 36px;
}

.mf-store-confirm__head {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #951162;
}

.mf-store-confirm__head svg {
	flex: none;
}

.mf-store-confirm .mf-store-confirm__title {
	margin: 0;
	padding: 0;
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: #232323;
}

.mf-store-confirm .mf-store-confirm__text {
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.55;
	color: #5c5c5c;
}

.mf-store-confirm__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 8px;
}

.mf-store-confirm .mf-store-confirm__stay,
.mf-store-confirm .mf-store-confirm__go {
	flex: 1 1 auto; /* Long store names wrap the pair: fill each row instead of a ragged stack. */
	min-height: 48px;
	margin: 0;
	padding: 0 24px;
	border-radius: 0;
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
}

.mf-store-confirm .mf-store-confirm__stay {
	background: #fff;
	border: 2px solid #232323;
	color: #232323;
}

.mf-store-confirm .mf-store-confirm__stay:hover {
	background: #f4f4f4;
}

.mf-store-confirm .mf-store-confirm__go {
	background: #a4115b;
	border: 0;
	color: #fff;
}

.mf-store-confirm .mf-store-confirm__go:hover {
	background: #000;
}

.mf-store-confirm .mf-store-confirm__stay:focus-visible,
.mf-store-confirm .mf-store-confirm__go:focus-visible {
	outline: 2px solid #232323;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.mf-store-confirm {
		width: 100%;
		max-width: 100%;
		max-height: 100%;
		margin: auto 0 0;
		box-shadow: 0 -12px 40px rgba(0, 0, 0, .3);
	}

	.mf-store-confirm__form {
		padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
	}

	.mf-store-confirm .mf-store-confirm__title {
		font-size: 20px;
	}

	.mf-store-confirm .mf-store-confirm__text {
		font-size: 14px;
	}

	/* Primary action on top, both full width. */
	.mf-store-confirm__actions {
		flex-direction: column-reverse;
	}

	.mf-store-confirm .mf-store-confirm__stay,
	.mf-store-confirm .mf-store-confirm__go {
		width: 100%;
	}
}
