/* Alredaa branch map — MapLibre + OpenFreeMap (server-code/branch-map). */
.alr-bmap {
	--alr-gold: #9a7517;
	--alr-gold-deep: #7d5e10;
	--alr-gold-soft: #f3e6c4;
	--alr-gold-line: #c9a24f;
	--alr-navy: #385270;
	--alr-ivory: #faf7f0;
	--alr-ink: #2f2a22;
	--alr-muted: #7b7366;
	position: relative;
	display: flex;
	gap: 16px;
	font-family: 'Tajawal', system-ui, sans-serif;
	color: var(--alr-ink);
	line-height: 1.5;
}
.alr-bmap *, .alr-bmap *::before, .alr-bmap *::after { box-sizing: border-box; }
/* Theme (XStore / Elementor) button and text styles must not leak in */
.alr-bmap button { margin: 0; min-height: 0; min-width: 0; text-transform: none; letter-spacing: 0; text-shadow: none; }
.alr-bmap img { max-width: none; margin: 0; }
.alr-bmap__stage {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 460px;
	border-radius: 24px;
	overflow: hidden;
	background: #f7f3ea;
	box-shadow: 0 18px 40px -22px rgba(122, 90, 18, .55), 0 0 0 1px rgba(154, 117, 23, .18);
	isolation: isolate;
	container-type: inline-size;
}
.alr-bmap[data-variant="full"] .alr-bmap__stage { height: 600px; }
.alr-bmap__stage > .alr-bmap__map { position: absolute; inset: 0; } /* beats .maplibregl-map { position: relative } */
.alr-bmap__map .maplibregl-canvas { outline: none; }

/* Loading shimmer until the first tiles are drawn */
.alr-bmap__stage::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 5;
	background: linear-gradient(110deg, #f7f3ea 30%, #fbf6e8 45%, #f7f3ea 60%) 0 0 / 300% 100%;
	animation: alr-shimmer 1.4s linear infinite;
	transition: opacity .6s ease;
	pointer-events: none;
}
.alr-bmap.is-ready .alr-bmap__stage::after { opacity: 0; animation: none; }
@keyframes alr-shimmer { to { background-position: -150% 0; } }

/* Country chips */
.alr-bmap__chips {
	position: absolute;
	z-index: 3;
	top: 12px;
	inset-inline: 12px;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 2px;
}
.alr-bmap__chips::-webkit-scrollbar { display: none; }
/* centred when they fit, scrollable from the first chip when they don't */
.alr-bmap__chips > :first-child { margin-inline-start: auto; }
.alr-bmap__chips > :last-child { margin-inline-end: auto; }
.alr-bmap__chip {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 38px;
	padding: 0 14px 0 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 6px 16px -8px rgba(80, 60, 10, .45), 0 0 0 1px rgba(154, 117, 23, .16);
	font: 600 14px/1 'Tajawal', system-ui, sans-serif;
	color: var(--alr-ink);
	cursor: pointer;
	transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.alr-bmap__chip:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(80, 60, 10, .55), 0 0 0 1px rgba(154, 117, 23, .35); }
.alr-bmap__chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.alr-bmap__chip b {
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	display: inline-grid;
	place-items: center;
	background: var(--alr-gold-soft);
	color: var(--alr-gold-deep);
	font-size: 12px;
	font-weight: 700;
}
.alr-bmap__chip.is-active { background: linear-gradient(135deg, #b48a2a, var(--alr-gold-deep)); color: #fff; }
.alr-bmap__chip.is-active b { background: rgba(255, 255, 255, .22); color: #fff; }
/* Kuwait = White Uniform shops: the logo navy instead of gold */
.alr-bmap__chip--wu b { background: #dfe6ee; color: var(--alr-navy); }
.alr-bmap__chip--wu.is-active { background: linear-gradient(135deg, #5a7aa0, #2a405a); }
.alr-bmap__chip--all::before {
	content: '';
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--alr-globe) center / contain no-repeat;
	mask: var(--alr-globe) center / contain no-repeat;
	--alr-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E");
}

/* Bottom bar: nearest branch */
.alr-bmap__near {
	position: absolute;
	z-index: 3;
	bottom: 14px;
	left: 14px; /* physical corners: Kuwait sits top-left and Muscat bottom-right on the Gulf view */
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px 0 14px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #b48a2a, var(--alr-gold-deep));
	color: #fff;
	font: 700 15px/1 'Tajawal', system-ui, sans-serif;
	box-shadow: 0 12px 24px -12px rgba(110, 80, 10, .8);
	cursor: pointer;
	transition: transform .2s ease, opacity .25s ease;
}
.alr-bmap__near:hover { transform: translateY(-2px); }
.alr-bmap.has-card .alr-bmap__near { opacity: 0; pointer-events: none; }
.alr-bmap__near svg { width: 20px; height: 20px; flex: none; }
.alr-bmap__near.is-busy svg { animation: alr-spin 1s linear infinite; }
@keyframes alr-spin { to { transform: rotate(360deg); } }

/* Toast */
.alr-bmap__toast {
	position: absolute;
	z-index: 6;
	left: 50%;
	bottom: 72px;
	transform: translate(-50%, 10px);
	max-width: calc(100% - 32px);
	padding: 10px 16px;
	border-radius: 14px;
	background: rgba(47, 42, 34, .92);
	color: #fff;
	font-size: 14px;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.alr-bmap__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Branch card */
.alr-bmap__card {
	position: absolute;
	z-index: 4;
	top: 62px;
	left: 14px;
	width: 310px;
	max-height: calc(100% - 76px);
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 48px -20px rgba(60, 44, 8, .55), 0 0 0 1px rgba(154, 117, 23, .14);
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px) scale(.98);
	pointer-events: none;
	transition: opacity .28s ease, transform .28s cubic-bezier(.2, .9, .3, 1.2);
}
.alr-bmap__card.is-open { opacity: 1; transform: none; pointer-events: auto; }
.alr-bmap__photo {
	position: relative;
	flex: none;
	aspect-ratio: 2 / 1; /* the shop-front crops are 800×400 */
	background: #f4efe3 center / cover no-repeat;
}
.alr-bmap__photo.is-logo { background-size: contain; background-color: #fff; background-origin: content-box; padding: 18px; }
.alr-bmap__photo::after {
	content: '';
	position: absolute;
	inset: auto 0 0;
	height: 46px;
	background: linear-gradient(to top, rgba(0, 0, 0, .28), transparent);
}
.alr-bmap__photo.is-logo::after { display: none; }
.alr-bmap__close {
	position: absolute;
	z-index: 1;
	top: 10px;
	inset-inline-end: 10px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .94);
	color: var(--alr-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35);
}
.alr-bmap__tag {
	position: absolute;
	z-index: 1;
	bottom: 10px;
	inset-inline-start: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	font-size: 12px;
	font-weight: 700;
	color: var(--alr-ink);
}
.alr-bmap__tag img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.alr-bmap__body { padding: 14px 16px 16px; overflow-y: auto; }
.alr-bmap__seg { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.alr-bmap__seg button {
	border: 1px solid rgba(154, 117, 23, .35);
	background: #fff;
	color: var(--alr-gold-deep);
	border-radius: 999px;
	padding: 5px 12px;
	font: 600 12px/1.2 'Tajawal', system-ui, sans-serif;
	cursor: pointer;
}
.alr-bmap__seg button.is-active { background: var(--alr-gold); border-color: var(--alr-gold); color: #fff; }
.alr-bmap .alr-bmap__title { margin: 0 0 8px; padding: 0; font: 800 18px/1.35 'Tajawal', system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--alr-gold); text-align: start; }
.alr-bmap .alr-bmap__card.is-wu .alr-bmap__title { color: var(--alr-navy); }
.alr-bmap .alr-bmap__line { display: flex; gap: 8px; margin: 0 0 6px; padding: 0; font-size: 14px; line-height: 1.55; letter-spacing: 0; color: #4a443a; text-align: start; }
.alr-bmap__line svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--alr-gold); }
.alr-bmap__card.is-wu .alr-bmap__line svg { color: var(--alr-navy); }
.alr-bmap__dist {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0 2px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef4f8;
	color: #2c5a78;
	font-size: 13px;
	font-weight: 700;
}
.alr-bmap__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.alr-bmap__actions a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 9px 4px 8px;
	border-radius: 14px;
	background: var(--alr-ivory);
	box-shadow: inset 0 0 0 1px rgba(154, 117, 23, .18);
	color: var(--alr-gold-deep);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}
.alr-bmap__actions a:hover { background: var(--alr-gold); color: #fff; transform: translateY(-1px); }
.alr-bmap__actions a svg { width: 20px; height: 20px; }
.alr-bmap__actions a.is-wa:hover { background: #1fa855; }
.alr-bmap__card.is-wu .alr-bmap__actions a { color: var(--alr-navy); box-shadow: inset 0 0 0 1px rgba(56, 82, 112, .22); background: #f3f6f9; }
.alr-bmap__card.is-wu .alr-bmap__actions a:hover { background: var(--alr-navy); color: #fff; }
.alr-bmap__card.is-wu .alr-bmap__actions a.is-wa:hover { background: #1fa855; }
.alr-bmap__more {
	display: block;
	margin-top: 12px;
	text-align: center;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--alr-gold);
	text-decoration: none;
}
.alr-bmap__more:hover { text-decoration: underline; }

/* Pulse under the selected pin, the visitor's dot */
.alr-bmap__pulse { width: 18px; height: 18px; pointer-events: none; }
.alr-bmap__pulse::before, .alr-bmap__pulse::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--alr-gold);
	animation: alr-ring 1.8s ease-out infinite;
}
.alr-bmap__pulse::after { animation-delay: .9s; }
.alr-bmap__pulse.is-wu::before, .alr-bmap__pulse.is-wu::after { border-color: var(--alr-navy); }
@keyframes alr-ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.alr-bmap__me {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #2f7bd8;
	border: 3px solid #fff;
	box-shadow: 0 0 0 6px rgba(47, 123, 216, .22), 0 4px 10px rgba(0, 0, 0, .25);
}

/* Map controls in the brand style */
.alr-bmap .maplibregl-ctrl-top-right { top: 56px; }
.alr-bmap .maplibregl-ctrl-group {
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 8px 18px -10px rgba(80, 60, 10, .55), 0 0 0 1px rgba(154, 117, 23, .18);
}
.alr-bmap .maplibregl-ctrl-group button { width: 34px; height: 34px; padding: 0; border-radius: 0; background-color: #fff; box-shadow: none; }
.alr-bmap .maplibregl-ctrl-group button:hover { background-color: #f6efdd; }
.alr-bmap .maplibregl-ctrl-attrib { font-family: system-ui, sans-serif; font-size: 10px; }
.alr-bmap .maplibregl-cooperative-gesture-screen { font-family: 'Tajawal', system-ui, sans-serif; font-size: 18px; background: rgba(47, 42, 34, .55); }

/* Side list (full variant) */
.alr-bmap__list {
	flex: 0 0 330px;
	height: 600px;
	display: flex;
	flex-direction: column;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 18px 40px -26px rgba(122, 90, 18, .55), 0 0 0 1px rgba(154, 117, 23, .16);
	overflow: hidden;
}
.alr-bmap__list-head { padding: 16px 18px 10px; font-size: 17px; font-weight: 800; color: var(--alr-gold); border-bottom: 1px solid #f0e9da; }
.alr-bmap__list-head small { display: block; font-size: 13px; font-weight: 500; color: var(--alr-muted); }
.alr-bmap__items { flex: 1; overflow-y: auto; padding: 8px; }
.alr-bmap__group { margin: 10px 8px 6px; font-size: 13px; font-weight: 800; color: var(--alr-muted); display: flex; align-items: center; gap: 6px; }
.alr-bmap__group img { width: 18px; height: 18px; border-radius: 50%; }
.alr-bmap__item {
	display: flex;
	width: 100%;
	gap: 10px;
	align-items: center;
	padding: 8px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	text-align: start;
	font: inherit;
	cursor: pointer;
	transition: background .2s ease;
}
.alr-bmap__item:hover { background: var(--alr-ivory); }
.alr-bmap__item.is-active { background: var(--alr-gold-soft); }
.alr-bmap__thumb { flex: none; width: 46px; height: 46px; border-radius: 12px; background: #f4efe3 center / cover no-repeat; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); }
.alr-bmap__thumb.is-logo { background-size: 82%; background-color: #fff; }
.alr-bmap__item strong { display: block; font-size: 14px; color: var(--alr-ink); line-height: 1.35; }
.alr-bmap__item span { display: block; font-size: 12.5px; color: var(--alr-muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }

/* Branch card highlighted on the branches page */
.alr-bmap-flash { animation: alr-flash 2.4s ease; border-radius: 18px; }
@keyframes alr-flash { 0%, 60% { box-shadow: 0 0 0 4px rgba(201, 162, 79, .85), 0 20px 40px -16px rgba(122, 90, 18, .6); } 100% { box-shadow: none; } }

@container (max-width: 680px) {
	.alr-bmap__chips { gap: 6px; }
	.alr-bmap__chip { height: 34px; padding: 0 11px 0 7px; font-size: 13px; gap: 6px; }
	.alr-bmap__chip img { width: 20px; height: 20px; }
	.alr-bmap__chip b { min-width: 20px; height: 20px; font-size: 11px; }
}
@media (max-width: 1024px) {
	.alr-bmap { flex-direction: column; }
	.alr-bmap__list { flex: none; height: auto; max-height: 420px; }
}
@media (max-width: 640px) {
	.alr-bmap__stage { height: 500px; border-radius: 20px; }
	.alr-bmap[data-variant="full"] .alr-bmap__stage { height: 520px; }
}
/* Narrow map (phones; same 560px threshold as `small` in branch-map.js): bottom-sheet card */
@container (max-width: 560px) {
	.alr-bmap__chips { inset-inline: 8px; top: 10px; }
	.alr-bmap__chip { height: 36px; font-size: 13px; padding: 0 12px 0 8px; }
	.alr-bmap__card {
		top: auto;
		bottom: 8px;
		left: 8px;
		right: 8px;
		width: auto;
		max-height: 80%; /* the full 2:1 shop-front photo + details + buttons */
		border-radius: 20px;
		transform: translateY(24px);
	}
	.alr-bmap__body { padding: 12px 14px 14px; }
	.alr-bmap .alr-bmap__title { font-size: 17px; margin-bottom: 6px; }
	.alr-bmap__actions { margin-top: 10px; gap: 6px; }
	.alr-bmap__actions a { flex-direction: row; justify-content: center; gap: 6px; padding: 9px 4px; }
	.alr-bmap__actions a svg { width: 18px; height: 18px; }
	.alr-bmap__near { left: 10px; bottom: 10px; height: 42px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.alr-bmap *, .alr-bmap *::before, .alr-bmap *::after { animation: none !important; transition: none !important; }
}
