/* Custom map marker */
.project-map__marker {
	width: 40px;
	height: 40px;
	cursor: pointer;
}

.project-map__marker svg {
	width: 100%;
    min-width: 40px;
	height: 100%;
	fill: var(--pm-secondary, #55a630);
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Project Map */
.project-map {
	--pm-sidebar-width: 400px;
	--pm-height: 600px;
	--pm-mobile-map-height: 350px;
	--pm-mobile-sidebar-height: 300px;
	--pm-accent: #2271b1;
	--pm-border: #ddd;
	--pm-bg: #f9f9f9;
	--pm-card-bg: #fff;

	position: relative;
	height: var(--pm-height);
	border: 1px solid var(--pm-border);
	border-radius: 8px;
}

/* Sidebar */
.project-map__sidebar {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--pm-sidebar-width);
	overflow-y: auto;
	background: var(--pm-bg);
	border-right: 1px solid var(--pm-border);
	z-index: 1;
}

.project-map__sidebar::-webkit-scrollbar {
	width: 6px;
}

.project-map__sidebar::-webkit-scrollbar-track {
	background: transparent;
}

.project-map__sidebar::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.project-map__sidebar::-webkit-scrollbar-thumb:hover {
	background: #aaa;
}

/* Map */
.project-map__map {
	margin-left: var(--pm-sidebar-width);
	height: 100%;
	overflow: hidden;
}

/* Cards */
.project-map__card {
	background: var(--pm-card-bg);
	border-bottom: 1px solid var(--pm-border);
	transition: background 0.2s ease;
}

.project-map__card.is-active {
	background: rgba(var(--pm-secondary-rgb), 0.05);
	border-left: 3px solid var(--pm-accent);
}

.project-map__card-header {
	display: flex;
	align-items: center;
	padding: 14px 16px;
	cursor: pointer;
	gap: 10px;
}

.project-map__card-header:hover {
	background: #f0f0f0;
}

.project-map__card-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
}

.project-map__card-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	fill: var(--pm-accent);
}

.project-map__card-address {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	flex: 1;
	min-width: 0;
}

.project-map__card-toggle {
	flex-shrink: 0;
	background: var(--pm-accent);
	border-radius: 4px;
    border: 0;
    outline: 0;
	padding: 6px 12px;
	font-size: 12px;
	color: white;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.project-map__card-toggle:hover {
	background: rgba(var(--pm-accent-rgb), 0.75);
}

.project-map__card.is-expanded .project-map__card-toggle {
	display: none;
}

/* Card body (accordion) */
.project-map__card-body {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.project-map__card.is-expanded .project-map__card-body {
	max-height: 600px;
}

.project-map__card-content {
	padding: 0 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Detail rows (icon + text) */
.project-map__detail-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.project-map__detail-row--top {
	align-items: flex-start;
}

.project-map__detail-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
}

.project-map__detail-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	fill: var(--pm-secondary);
}

.project-map__card-full-address, .project-map__card-full-address p {
	font-size: 14px;
}

.project-map__card-date, .project-map__card-date p {
	font-size: 14px;
}

.project-map__card-description, .project-map__card-description p {
	font-size: 14px;
	line-height: 1.5;
}

.project-map__card-description p:first-child {
	margin-top: 0;
}

.project-map__card-description p:last-child {
	margin-bottom: 0;
}

/* Gallery */
.project-map__gallery-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.project-map__gallery-title {
	font-size: 14px;
	font-weight: 600;
}

.project-map__gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.project-map__gallery-thumb {
	width: 70px;
	height: 70px;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.project-map__gallery-thumb:hover {
	opacity: 0.8;
}

/* Tags */
.project-map__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.project-map__tag {
	display: inline-block;
	background: var(--pm-accent);
	color: white;
	font-size: 12px;
	font-weight: 500;
	padding: 3px 10px;
	border-radius: 12px;
	line-height: 1.4;
}

/* Empty state */
.project-map__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--pm-height);
	padding: 40px;
	text-align: center;
	color: #777;
	font-size: 15px;
}

/* Lightbox / Gallery Slider */
.project-map__lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
}

.project-map__lightbox-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	max-width: 90vw;
	max-height: 90vh;
}

.project-map__lightbox-main {
	max-width: 85vw;
	max-height: 70vh;
	object-fit: contain;
	border-radius: 4px;
}

.project-map__lightbox-close {
	position: fixed;
	top: 20px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	opacity: 0.7;
	transition: opacity 0.15s;
	z-index: 1;
}

.project-map__lightbox-close:hover {
	opacity: 1;
}

.project-map__lightbox-arrow {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 12px;
	line-height: 1;
	opacity: 0.5;
	transition: opacity 0.2s;
	z-index: 1;
}

.project-map__lightbox-arrow svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: #fff;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.project-map__lightbox-arrow:hover {
	opacity: 1;
}

.project-map__lightbox-arrow--prev {
	left: 20px;
}

.project-map__lightbox-arrow--next {
	right: 20px;
}

.project-map__lightbox-counter {
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
}

.project-map__lightbox-strip {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	max-width: 85vw;
	padding: 6px;
}

.project-map__lightbox-strip::-webkit-scrollbar {
	height: 4px;
}

.project-map__lightbox-strip::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
}

.project-map__lightbox-thumb {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.15s;
	flex-shrink: 0;
}

.project-map__lightbox-thumb:hover {
	opacity: 0.8;
}

.project-map__lightbox-thumb.is-active {
	opacity: 1;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.project-map__lightbox-arrow--prev { left: 5px; }
	.project-map__lightbox-arrow--next { right: 5px; }
	.project-map__lightbox-arrow svg { width: 22px; height: 22px; }
	.project-map__lightbox-main { max-height: 55vh; }
}

/* Mobile */
@media (max-width: 768px) {
	.project-map {
		display: flex;
		flex-direction: column-reverse;
		height: auto;
	}

	.project-map__sidebar {
		position: static;
		width: 100%;
		max-height: var(--pm-mobile-sidebar-height);
		border-right: none;
		border-top: 1px solid var(--pm-border);
	}

	.project-map__map {
		margin-left: 0;
		height: var(--pm-mobile-map-height);
	}
}
