/* 70년만의 귀향 — 정적 보존 사이트 보조 스타일
 * 귀향길 고정 지도(Progress Map 대체). 색상·크기는 원본 Progress Map 설정값을 따른다.
 *  - 목록(캐러셀) 항목 320×100, 배경 #f9f9f9 / 마우스 오버 #f3f3f3
 *  - 마커 pin-blue.png, 묶음 small-cluster.png(흰 글자), 선택 시 붉은 맥동 원
 *  - 정보창: 원본 cspm_type4(흰 바탕, 제목 #2898DB)
 */

.sm-map {
	position: relative;
	margin: 0 0 20px;
}

/* 목록 (원본 캐러셀 자리) */
.sm-carousel {
	position: relative;
	margin-bottom: 8px;
	padding: 0 26px;
}

.sm-list {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 0;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.sm-item {
	flex: 0 0 320px;
	display: flex;
	height: 100px;
	background: #f9f9f9;
	border: 1px solid #e3e3e3;
	color: #343434;
	text-decoration: none;
	scroll-snap-align: start;
	box-sizing: border-box;
	overflow: hidden;
}

.sm-item:hover,
.sm-item:focus {
	background: #f3f3f3;
	color: #343434;
	text-decoration: none;
}

.sm-item .sm-thumb {
	flex: 0 0 100px;
	width: 100px;
	height: 98px;
	background: #e6e6e6;
}

.sm-item .sm-thumb img {
	display: block;
	width: 100px;
	height: 98px;
	max-width: none;
	object-fit: cover;
}

.sm-item .sm-txt {
	flex: 1 1 auto;
	min-width: 0;
}

.sm-item .sm-title {
	display: block;
	max-height: 52px;
	padding: 5px 10px;
	overflow: hidden;
	background: rgba(0, 102, 204, 0.2);
	color: #063f74;
	font-size: 14px;
	line-height: 1.5;
}

.sm-item .sm-info {
	display: block;
	padding: 5px 10px;
	overflow: hidden;
	color: #343434;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sm-prev,
.sm-next {
	position: absolute;
	top: 50%;
	width: 22px;
	height: 40px;
	margin-top: -20px;
	padding: 0;
	border: 0;
	background: #9e8f86;
	color: #fff;
	font-size: 16px;
	line-height: 40px;
	cursor: pointer;
}

.sm-prev {
	left: 0;
}

.sm-next {
	right: 0;
}

/* 지도 */
.sm-frame {
	position: relative;
	overflow: hidden;
	background: #aad3df;
}

.sm-frame img.sm-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
}

.sm-route-line {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.sm-route-line polyline {
	fill: none;
	stroke: #b03a2e;
	stroke-width: 2;
	stroke-dasharray: 6 5;
	stroke-opacity: 0.75;
}

.sm-markers {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
}

.sm-marker {
	position: absolute;
	display: block;
	text-decoration: none;
}

.sm-pin {
	width: 21px;
	height: 28px;
	margin: -28px 0 0 -10px; /* 핀 끝이 좌표를 가리키도록 */
	background: url(../images/plugins/codespacing-progress-map/pin-blue.png) no-repeat;
}

.sm-cluster {
	width: 57px;
	height: 57px;
	margin: -28px 0 0 -28px;
	background: url(../images/plugins/codespacing-progress-map/small-cluster.png) no-repeat;
	color: #fff;
	font: bold 11px/57px Arial, sans-serif;
	text-align: center;
}

.sm-cluster:hover,
.sm-cluster:focus {
	color: #fff;
	text-decoration: none;
}

/* 선택 표시: 원본 Progress Map의 붉은 맥동 원 */
.sm-marker.sm-active::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 50px;
	height: 50px;
	margin: -25px 0 0 -25px;
	border: 5px solid #cc0000;
	border-radius: 60px;
	box-sizing: border-box;
	animation: sm-pulsating 1s ease-out infinite;
}

.sm-pin.sm-active::after {
	top: 100%;
}

@keyframes sm-pulsating {
	0% { transform: scale(0); opacity: 0; }
	25% { transform: scale(0); opacity: 0.1; }
	50% { transform: scale(0.1); opacity: 0.3; }
	75% { transform: scale(0.5); opacity: 0.5; }
	100% { transform: scale(1); opacity: 0; }
}

/* 정보창 (원본 cspm_type4) */
.sm-pop {
	position: absolute;
	z-index: 20;
	width: 240px;
	max-width: 90%;
	max-height: 260px;
	overflow-y: auto;
	padding: 8px 22px 6px 10px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
}

.sm-pop-close {
	position: absolute;
	right: 2px;
	top: 0;
	padding: 0 5px;
	border: 0;
	background: none;
	color: #888;
	font-size: 18px;
	line-height: 22px;
	cursor: pointer;
}

.sm-pop-item {
	padding: 3px 0;
	border-top: 1px solid #eee;
}

.sm-pop-item:first-child {
	border-top: 0;
}

.sm-pop-item a {
	display: block;
	color: #2898db;
	font-size: 13px;
	line-height: 1.4;
}

.sm-pop-item a:hover {
	color: #2cace3;
}

.sm-pop-item span {
	display: block;
	color: #888;
	font-size: 11px;
}

/* 출처 표시 (OpenStreetMap 라이선스 요구사항) */
.sm-attrib {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 10;
	padding: 0 5px;
	background: rgba(255, 255, 255, 0.75);
	color: #333;
	font-size: 11px;
	line-height: 16px;
}

.sm-attrib a {
	color: #0078a8;
}

/* 글 안의 소형 지도 (원본 [codespacing_light_map]) */
.sm-light {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #aad3df;
}

.sm-light img.sm-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.sm-light .sm-pin {
	left: 50%;
	top: 50%;
}
