/**
 * BC Location Map Widget — Structural CSS
 * Handles layout / positioning / hover behaviour only.
 * All colors, sizes, typography etc. are controlled from Elementor's
 * Style tab (see class-bc-location-map-widget.php) and injected as
 * scoped inline rules by Elementor itself — this file just makes the
 * markup actually work.
 */

.bc-map-wrapper {
	position: relative;
	width: 100%;
	overflow: visible;
}

.bc-map-wrapper .bc-map-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	z-index: 1;
}

.bc-location-item {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 2;
	--bc-card-gap: 16px;
	--bc-arrow-color: #ffffff;
}

.bc-location-marker {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	overflow: hidden;
	cursor: pointer;
	box-sizing: border-box;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	position: relative;
	z-index: 3;
}

.bc-location-marker img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---------- Card ---------- */

.bc-location-card {
	position: absolute;
	width: 200px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 10;
}

.bc-location-item:hover .bc-location-card,
.bc-location-item.bc-active .bc-location-card {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Card placement relative to marker */
.bc-card-pos-top .bc-location-card {
	bottom: calc(100% + var(--bc-card-gap));
	left: 50%;
	transform: translate(-50%, 6px);
}
.bc-card-pos-top:hover .bc-location-card,
.bc-card-pos-top.bc-active .bc-location-card {
	transform: translate(-50%, 0);
}

.bc-card-pos-bottom .bc-location-card {
	top: calc(100% + var(--bc-card-gap));
	left: 50%;
	transform: translate(-50%, -6px);
}
.bc-card-pos-bottom:hover .bc-location-card,
.bc-card-pos-bottom.bc-active .bc-location-card {
	transform: translate(-50%, 0);
}

.bc-card-pos-left .bc-location-card {
	right: calc(100% + var(--bc-card-gap));
	top: 50%;
	transform: translate(6px, -50%);
}
.bc-card-pos-left:hover .bc-location-card,
.bc-card-pos-left.bc-active .bc-location-card {
	transform: translate(0, -50%);
}

.bc-card-pos-right .bc-location-card {
	left: calc(100% + var(--bc-card-gap));
	top: 50%;
	transform: translate(-6px, -50%);
}
.bc-card-pos-right:hover .bc-location-card,
.bc-card-pos-right.bc-active .bc-location-card {
	transform: translate(0, -50%);
}

/* Arrow pointing from card to marker */
.bc-location-card::after {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border: 7px solid transparent;
}

.bc-card-pos-top .bc-location-card::after {
	top: 100%;
	left: 50%;
	margin-left: -7px;
	border-top-color: var(--bc-arrow-color);
}
.bc-card-pos-bottom .bc-location-card::after {
	bottom: 100%;
	left: 50%;
	margin-left: -7px;
	border-bottom-color: var(--bc-arrow-color);
}
.bc-card-pos-left .bc-location-card::after {
	left: 100%;
	top: 50%;
	margin-top: -7px;
	border-left-color: var(--bc-arrow-color);
}
.bc-card-pos-right .bc-location-card::after {
	right: 100%;
	top: 50%;
	margin-top: -7px;
	border-right-color: var(--bc-arrow-color);
}

/* ---------- Card content ---------- */

.bc-card-image img {
	width: 100%;
	height: 100px;
	object-fit: cover;
	display: block;
	border-radius: 8px;
}

.bc-card-body {
	padding-top: 8px;
}

.bc-card-title {
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 4px;
}

.bc-card-subtitle {
	font-size: 12px;
	line-height: 1.3;
	margin: 0 0 6px;
}

.bc-card-description {
	font-size: 12px;
	line-height: 1.4;
	margin: 0 0 6px;
}

.bc-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 6px;
}

.bc-card-meta-left {
	font-size: 11px;
	opacity: 0.8;
}

.bc-card-meta-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.bc-card-link {
	position: absolute;
	inset: 0;
	z-index: 4;
}

/* Touch devices: tap-to-toggle support handled via .bc-active class from JS */
