.bsa-button-wrap {
	margin-top: 1rem;
}

.bsa-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.bsa-modal.is-open {
	display: block;
}

.bsa-modal__overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.55);
}

.bsa-modal__dialog {
	width: min(720px, 100%);
	max-height: min(80vh, 760px);
	overflow: auto;
	background: #fff;
	color: #222;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.bsa-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #e5e5e5;
}

.bsa-modal__header h2 {
	margin: 0;
	font-size: 1.4rem;
}

.bsa-modal__close {
	flex: 0 0 auto;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.bsa-modal__content {
	padding: 1.5rem;
}

.bsa-store-list {
	display: grid;
	gap: 1rem;
}

.bsa-store {
	padding: 1rem;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
}

.bsa-store__name {
	margin: 0 0 0.4rem;
	font-size: 1.1rem;
}

.bsa-store__address,
.bsa-store__phone {
	margin: 0.2rem 0;
}

.bsa-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.85rem 0 0;
	padding: 0;
	list-style: none;
}

.bsa-swatch {
	display: inline-flex;
	align-items: center;
	overflow: hidden;
	border: 1px solid currentColor;
	border-radius: 999px;
	line-height: 1;
}

.bsa-swatch__type,
.bsa-swatch__quantity {
	padding: 0.45rem 0.65rem;
}

.bsa-swatch__quantity {
	border-left: 1px solid currentColor;
	font-weight: 600;
}

.bsa-status {
	margin: 0;
	text-align: center;
}

.bsa-status--loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
}

.bsa-status--error p {
	margin-top: 0;
}

.bsa-spinner {
	display: inline-block;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: bsa-spin 0.7s linear infinite;
}

.bsa-modal-open {
	overflow: hidden;
}

@keyframes bsa-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
	.bsa-modal__overlay {
		align-items: flex-end;
		padding: 0;
	}

	.bsa-modal__dialog {
		width: 100%;
		max-height: 90vh;
		border-radius: 8px 8px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bsa-spinner {
		animation-duration: 1.5s;
	}
}
