/* =============================================================
   BrandRocks Locations Map – v1.0.0
   ============================================================= */

.brlm-wrapper {
	width: 100%;
}

/* ─── Mapa ───────────────────────────────────────────────────── */
.brlm-map {
	position: relative;
	width: 100%;
	height: 520px;
	background-size: contain;
	background-position: center center;
	background-repeat: no-repeat;
	box-sizing: border-box;
}

/* ─── Pinezka ────────────────────────────────────────────────── */
.brlm-pin {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 8px;
	transform: translate(-50%, -50%);
	z-index: 2;
}

.brlm-pin--left {
	flex-direction: row-reverse;
}

.brlm-pin.is-open {
	z-index: 10;
}

/* ─── Znacznik (kropka) ──────────────────────────────────────── */
.brlm-dot {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: #e5322d;
	border: 3px solid #ffffff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
	box-sizing: border-box;
	position: relative;
}

.brlm-pin--pulse .brlm-dot::after {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid currentColor;
	color: #e5322d;
	animation: brlm-pulse 1.8s ease-out infinite;
}

@keyframes brlm-pulse {
	0% {
		transform: scale(0.6);
		opacity: 0.8;
	}
	100% {
		transform: scale(1.8);
		opacity: 0;
	}
}

/* ─── Etykieta (flaga + nazwa) ───────────────────────────────── */
.brlm-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	background-color: #ffffff;
	border: none;
	border-radius: 30px;
	padding: 6px 16px 6px 6px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.brlm-pin--left .brlm-badge {
	padding: 6px 6px 6px 16px;
}

.brlm-badge:hover {
	transform: translateY(-1px);
}

.brlm-badge__flag {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
}

.brlm-badge__text {
	font-weight: 600;
	line-height: 1;
}

.brlm-pin.is-open .brlm-badge {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.9);
	position: absolute;
}

/* ─── Karta lokalizacji ──────────────────────────────────────── */
.brlm-card {
	position: absolute;
	left: 50%;
	top: calc(100% + 14px);
	transform: translateX(-50%) translateY(6px);
	width: 280px;
	max-width: 90vw;
	background-color: #ffffff;
	border-radius: 16px;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
	overflow: hidden;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.brlm-pin.is-open .brlm-card {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

/* Karta powyżej pinezki */
.brlm-card.brlm-card--top {
	top: auto;
	bottom: calc(100% + 14px);
}

.brlm-pin.is-open .brlm-card.brlm-card--top {
	transform: translateX(-50%) translateY(0);
}
.brlm-card.brlm-card--top {
	transform: translateX(-50%) translateY(-6px);
}

/* Łącznik między znacznikiem a kartą */
.brlm-card::before {
	content: '';
	position: absolute;
	left: var(--brlm-arrow-left, 50%);
	top: -6px;
	width: 12px;
	height: 12px;
	background-color: #ffffff;
	transform: translateX(-50%) rotate(45deg);
	box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

.brlm-card--top::before {
	top: auto;
	bottom: -6px;
	transform: translateX(-50%) rotate(45deg);
}

.brlm-card__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.9);
	color: #1a1a1a;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.brlm-card__image {
	width: 100%;
	height: 150px;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.brlm-card__body {
	padding: 16px 18px 18px;
}

.brlm-card__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.brlm-card__title {
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.brlm-card__flag {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

.brlm-card__subtitle {
	display: block;
	margin-top: 4px;
	color: #6b6b6b;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.brlm-badge {
		padding: 4px 12px 4px 4px;
	}

	.brlm-pin--left .brlm-badge {
		padding: 4px 4px 4px 12px;
	}

	.brlm-badge__flag {
		width: 18px;
		height: 18px;
	}
}
