/* ==========================================================================
   Aroma Store Locator — store-locator.css
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
.asl-wrapper {
	--asl-primary:     #1660aa;
	--asl-primary-bg:  #f0f7ff;
	--asl-map-height:  700px;
}

/* ---- Wrapper ------------------------------------------------------------- */
.asl-wrapper {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: var(--asl-map-height);
	background: #ffffff;
	border-radius: 24px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	border: 1px solid #f3f4f6;
	overflow: hidden;
	box-sizing: border-box;
	font-family: inherit;
}

/* ---- Left panel ---------------------------------------------------------- */
.asl-panel {
	width: 40%;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #f3f4f6;
	height: 100%;
	overflow: hidden;
}

/* ---- Controls (search + filter) ----------------------------------------- */
.asl-panel__controls {
	padding: 24px;
	border-bottom: 1px solid #f3f4f6;
	background: #ffffff;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ---- Search -------------------------------------------------------------- */
.asl-search-wrap {
	position: relative;
}

.asl-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
	color: #9ca3af;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
}

.asl-search {
	width: 100%;
	padding: 10px 16px 10px 40px;
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	font-size: 14px;
	color: #111827;
	box-sizing: border-box;
	line-height: 1.5;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	font-family: inherit;
}

.asl-search:focus {
	border-color: var(--asl-primary);
	box-shadow: 0 0 0 4px rgba(22, 96, 170, 0.15);
}

.asl-search::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* ---- Province pills ------------------------------------------------------ */
.asl-panel__pills {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 2px;
	scrollbar-width: none;
}

.asl-panel__pills::-webkit-scrollbar {
	display: none;
}

.asl-wrapper .asl-pill {
	white-space: nowrap;
	padding: 6px 16px;
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 700;
	border: 1px solid #e5e7eb;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.5;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
	background-color: #ffffff;
	color: #6b7280;
}

.asl-wrapper .asl-pill:not(.is-active):hover {
	border-color: var(--asl-primary);
	color: var(--asl-primary);
	background-color: #ffffff;
}

.asl-wrapper .asl-pill.is-active {
	background-color: var(--asl-primary);
	border-color: transparent;
	color: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.asl-wrapper .asl-pill:focus-visible {
	outline: 2px solid var(--asl-primary);
	outline-offset: 2px;
}

/* ---- Province select (dropdown fallback) --------------------------------- */
.asl-province-select {
	width: 100%;
	padding: 10px 36px 10px 12px;
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	font-size: 14px;
	color: #111827;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234b5563'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	box-sizing: border-box;
	line-height: 1.5;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.asl-province-select:focus {
	border-color: var(--asl-primary);
	box-shadow: 0 0 0 4px rgba(22, 96, 170, 0.15);
}

/* ---- Store list ---------------------------------------------------------- */
.asl-store-list {
	list-style: none;
	margin: 0;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
	flex: 1 1 auto;
	box-sizing: border-box;
	scrollbar-width: thin;
	scrollbar-color: #e5e7eb transparent;
}

.asl-store-list::-webkit-scrollbar {
	width: 4px;
}

.asl-store-list::-webkit-scrollbar-thumb {
	background-color: #e5e7eb;
	border-radius: 2px;
}

/* ---- Store item (card) --------------------------------------------------- */
.asl-store-item {
	width: 100%;
	text-align: left;
	padding: 20px;
	border-radius: 16px;
	border: 1px solid #f3f4f6;
	background-color: #ffffff;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
	outline: none;
	box-sizing: border-box;
	display: block;
}

.asl-wrapper .asl-store-item:hover {
	border-color: rgba(22, 96, 170, 0.2);
	background-color: #ffffff;
	box-shadow: 0 2px 6px rgba(22, 96, 170, 0.08);
}

.asl-store-item:focus-visible {
	outline: 2px solid var(--asl-primary);
	outline-offset: 2px;
}

.asl-store-item.is-active {
	background-color: var(--asl-primary-bg);
	border-color: rgba(22, 96, 170, 0.3);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Store name */
.asl-store-item__name {
	font-size: 0.8em;
	font-weight: 700;
	margin: 0 0 8px 0;
	padding: 0;
	color: #104375;
	line-height: 1.4;
}

@media (min-width: 768px) {
	.asl-store-item__name { font-size: 0.95em; }
}

.asl-store-item.is-active .asl-store-item__name {
	color: var(--asl-primary);
}

/* Fields */
.asl-store-item__fields {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.asl-store-item__address,
.asl-store-item__phone,
.asl-store-item__hours {
	display: flex;
	gap: 8px;
	color: #4b5563;
	line-height: 1.5;
	font-size: 0.875em;
}

.asl-store-item__address {
	align-items: flex-start;
}

.asl-store-item__phone,
.asl-store-item__hours {
	align-items: center;
}

.asl-store-item__phone a {
	color: inherit;
	text-decoration: none;
	font-weight: 500;
}

.asl-store-item__phone a:hover {
	text-decoration: underline;
}

/* Icons */
.asl-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	color: #9ca3af;
}

.asl-store-item__address .asl-icon {
	margin-top: 2px;
}

.asl-icon svg {
	width: 16px;
	height: 16px;
}

.asl-icon i {
	font-size: 16px;
	line-height: 1;
}

/* Empty / no-results */
.asl-store-item--empty {
	cursor: default;
	color: #4b5563;
	font-size: 14px;
	text-align: center;
	border-style: dashed;
}

.asl-store-item[hidden] {
	display: none;
}

.asl-no-results {
	padding: 16px;
	font-size: 14px;
	color: #4b5563;
	text-align: center;
}

/* ---- Map panel ----------------------------------------------------------- */
.asl-map {
	flex: 1;
	position: relative;
	background-color: #f3f4f6;
	overflow: hidden;
}

.asl-map__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.asl-map__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #4b5563;
	font-size: 14px;
}

/* Mobile active-store label overlay */
.asl-map__active-label {
	display: none;
	position: absolute;
	top: 16px;
	left: 16px;
	right: 16px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 16px;
	border-radius: 12px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	border: 1px solid #f3f4f6;
}

.asl-map__active-label-inner {
	font-weight: 700;
	color: #104375;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.asl-map__active-label-inner svg {
	flex-shrink: 0;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
	.asl-wrapper {
		flex-direction: column;
		height: auto;
	}

	.asl-map {
		order: -1;
		flex: none;
		width: 100%;
		height: 300px;
	}

	.asl-panel {
		order: 0;
		width: 100%;
		max-height: 420px;
		border-right: none;
		border-top: 1px solid #f3f4f6;
	}

	.asl-map__active-label {
		display: block;
	}
}
