/* ==================================================
不動産物件マップ CSS
スマホ → タブレット → PC
ブレイクポイント：768px / 960px
================================================== */

/* ==================================================

1. スマートフォン（767px以下）
   ================================================== */

.estate-map-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	width: 100%;
	margin: 20px auto;
	align-items: start;
	border: rgba(108, 255, 248, 0.685) solid 3px;
	border-radius: 15px;
	background: #aadeffa2;
}

.estate-map-canvas {
	width: 100%;
	height: 55vh;
	min-height: 320px;
	overflow: hidden;
	border-radius: 4px;
	background: #eef3f5;
	z-index: 1;
}

.estate-map-list {
	max-height: 500px;
	overflow-y: auto;
	padding-right: 8px;
	min-width: 0;
	background: rgba(217, 255, 239, 0.815);
}

.estate-map-heading {
	margin: 0 0 14px;
	font-size: 1.1rem;
	font-weight: 700;
}

.estate-map-items {
	list-style: none;
	padding: 0;
	margin: 0;
}

.estate-map-item {
	padding: 12px 6px;
	margin: 0;
	border-bottom: 1px solid #dce5e9;
	transition: background-color 0.2s ease;
}

.estate-map-item:hover,
.estate-map-item.is-active {
	background: #edf8ff;
}

/* 一覧のクリック領域 */

.estate-map-item-button {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

/* 一覧の番号 */

.estate-map-number {
	display: flex;
	flex: 0 0 32px;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #1689c9;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

/* 物件情報 */

/* 物件情報を縦方向のFlexにする */
.estate-map-item-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	flex: 1 1 0;
	min-width: 0;
	gap: 6px;
}

/* 詳細リンク */
.estate-map-detail-link {
	display: inline-block;
	align-self: flex-start;
	margin: 4px 0 0;
	color: #1689c9;
	font-size: 0.85rem;
	text-decoration: none;
}

.estate-map-detail-link:hover {
	text-decoration: underline;
}

/* 番号付きマーカー */

.estate-number-marker {
	background: transparent;
	border: none;
}

.estate-number-marker span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	box-sizing: border-box;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #168bd2;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	transition:
		background-color 0.2s ease,
		transform 0.2s ease;
}

/* リストのホバー時 */

.estate-number-marker span.is-hovered {
	background: #f07832;
	transform: scale(1.2);
}

/* 旧形式のマーカー用（必要な場合に備えて維持） */

.estate-map-marker-wrapper {
	border: 0;
	background: transparent;
}

.estate-map-marker {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #1689c9;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.estate-map-marker.is-active {
	background: #f07836;
	transform: scale(1.2);
}

/* 吹き出し */

.estate-map-popup strong {
	display: block;
	margin-bottom: 8px;
	line-height: 1.5;
}

.estate-map-popup p {
	margin: 5px 0;
}

.estate-map-popup a {
	color: #1689c9;
}

.estate-map-empty {
	padding: 12px;
	color: #687780;
}

/* icon color */
.estate-number-marker {
	background: transparent;
	border: none;
}

.estate-number-marker span {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 32px;
	height: 32px;
	box-sizing: border-box;

	border: 2px solid #fff;
	border-radius: 50%;

	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;

	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);

	transition:
		background-color 0.2s ease,
		transform 0.2s ease;
}

/* 建物：青 */
.estate-number-marker span.is-building {
	background: #168bd2;
}

/* マンション：紫 */
.estate-number-marker span.is-mansion {
	background: #8758b5;
}

/* 土地：緑 */
.estate-number-marker span.is-land {
	background: #299b68;
}

/* 山林：茶色 */
.estate-number-marker span.is-forest {
	background: #987044;
}

/* その他・カテゴリー未設定 */
.estate-number-marker span.is-other {
	background: #7b8790;
}

/* ホバー時はオレンジ色 */
.estate-number-marker span.is-hovered {
	background: #f07832;
	transform: scale(1.2);
}

/* ========================================
   カテゴリーラベル：共通
======================================== */
.estate-map-item-category {
	display: inline-block;
	align-self: flex-start;
	padding: 3px 9px;
	margin-top: 2px;
	border-radius: 4px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.5;
}

/* 土地：緑 */
.estate-map-item-category.is-land {
	background-color: #2e8b57;
}

/* 建物：青 */
.estate-map-item-category.is-building {
	background-color: #168bd2;
}

/* マンション：紫 */
.estate-map-item-category.is-mansion {
	background-color: #8056a8;
}

/* 山林：茶色 */
.estate-map-item-category.is-forest {
	background-color: #8b6545;
}

/* その他 */
.estate-map-item-category.is-other {
	background-color: #77838c;
}

/* ========================================
   マップ吹き出し：共通
======================================== */
.estate-map-popup {
	min-width: 180px;
}

.estate-map-popup-category {
	display: inline-block;
	padding: 3px 9px;
	margin-bottom: 8px;
	border-radius: 4px;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.5;
}

/* 建物：青 */
.estate-map-popup-category.is-building {
	background-color: #168bd2;
}

/* マンション：紫 */
.estate-map-popup-category.is-mansion {
	background-color: #8056a8;
}

/* 土地：緑 */
.estate-map-popup-category.is-land {
	background-color: #2e8b57;
}

/* 山林：茶色 */
.estate-map-popup-category.is-forest {
	background-color: #8b6545;
}

/* その他 */
.estate-map-popup-category.is-other {
	background-color: #77838c;
}

.estate-map-popup-title {
	margin-bottom: 6px;
	font-weight: 700;
}

.estate-map-popup-title a {
	color: #168bd2;
	text-decoration: none;
}

.estate-map-popup-title a:hover {
	text-decoration: underline;
}

.estate-map-popup-address,
.estate-map-popup-price {
	font-size: 0.85rem;
	line-height: 1.6;
}

/* ご商談中ラベル */
.estate-map-popup-status {
	display: inline-block;
	padding: 4px 10px;
	margin-bottom: 8px;
	background-color: #000;
	color: #fff;
	border-radius: 3px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.5;
}

.estate-map-status {
	display: inline-block;
	width: fit-content;
	max-width: max-content;
	align-self: flex-start;
	padding: 3px 9px;
	margin: 2px 0;
	background: #000;
	color: #fff;
	border-radius: 3px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.5;
}

/* ステータスとカテゴリーを横並び */
.estate-map-item-labels {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	width: 100%;
}

/* ご商談中：黒地・白文字 */
.estate-map-status {
	display: inline-block;
	flex: 0 0 auto;
	width: fit-content;
	padding: 3px 9px;
	margin: 2px 0;
	background: #000;
	color: #fff;
	border-radius: 3px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.5;
}

/* カテゴリー共通 */
.estate-map-item-category {
	display: inline-block;
	flex: 0 0 auto;
	width: fit-content;
	padding: 3px 9px;
	margin: 2px 0;
	border-radius: 4px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.5;
}

/* ========================================
   物件一覧のアイキャッチ画像
======================================== */

.estate-map-item-image {
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: 5px;
}

.estate-map-item-image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* ========================================
   物件一覧：スマホ基本
======================================== */

.estate-map-item-button {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	width: 100%;
	padding: 12px 8px;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
}

/* 番号・タイトル */
.estate-map-item-header {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding-bottom: 8px;
	border-bottom: 1px solid #ddd;
}

/* 番号 */
.estate-map-item-header .estate-map-number {
	display: flex;
	flex: 0 0 28px;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
}

/* タイトル */
.estate-map-item-title {
	display: block;
	flex: 1 1 0;
	min-width: 0;
	font-weight: 700;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* タイトル下：情報左・画像右 */
.estate-map-item-body {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	flex-wrap: nowrap;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

/* 左側：物件情報 */
.estate-map-item-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 0;
	min-width: 0;
	gap: 6px;
}

/* カテゴリー・販売状況 */
.estate-map-item-labels {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.estate-map-item-category,
.estate-map-status {
	flex: 0 0 auto;
	width: fit-content;
}

/* 住所 */
.estate-map-item-address {
	display: block;
	width: 100%;
	font-size: 0.85rem;
	overflow-wrap: anywhere;
}

/* 価格 */
.estate-map-item-price {
	color: crimson;
	display: block;
	width: 100%;
	font-weight: 700;
}

/* 右側：アイキャッチ画像 */
.estate-map-item-image {
	display: block;
	flex: 0 0 140px;
	width: 90px;
	aspect-ratio: 4 / 3;
	align-self: flex-end;
	overflow: hidden;
	border-radius: 5px;
	background: #f1f1f1;
}

.estate-map-item-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
}

/* 画像未設定 */
.estate-map-item-image.is-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.estate-map-item-image.is-no-image span {
	color: #999;
	font-size: 0.65rem;
}

/* ========================================
   物件マップ専用：ぼやけ対策
   Index.css は変更しない
======================================== */

/* マップを含むセクションだけ傾斜解除 */
.index_content:has(.estate-map-wrap) {
	transform: none !important;
}

/* マップを含む内部要素だけ傾斜解除 */
.index_content_inner:has(.estate-map-wrap) {
	transform: none !important;
}

/* 地図とリストの微小回転を解除 */
.estate-map-canvas,
.estate-map-list {
	transform: none !important;
	filter: none;
	-webkit-backface-visibility: visible;
	backface-visibility: visible;
	will-change: auto;
}

/* 地図・一覧の不要な変形を解除 */
.estate-map-canvas,
.estate-map-list {
	transform: none !important;
	-webkit-transform: none !important;
	filter: none !important;
	backface-visibility: visible;
	-webkit-backface-visibility: visible;
	will-change: auto;
}

.estate-map-list {
	position: relative;
	transform: none;
	filter: none;
	backface-visibility: visible;
}

/* ========================================
   物件種別 property_type
======================================== */

.estate-map-item-property-type,
.estate-map-popup-property-type {
	display: inline-block;
	align-self: flex-start;
	width: fit-content;
	max-width: 100%;
	padding: 3px 9px;
	border: 1px solid #9fc9df;
	border-radius: 4px;
	background: #edf7fc;
	color: #245c7a;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.5;
}

.estate-map-list {
	display: none;
}

/* ==================================================
2. タブレット（768px〜960px）
================================================== */

@media (min-width: 768px) and (max-width: 960px) {


	.estate-map-wrap {
		display: grid;
		grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr);
		gap: 16px;
		width: 100%;
		margin: 24px auto;
		align-items: start;
	}

	.estate-map-canvas {
		height: 500px;
		min-height: 400px;
	}

	.estate-map-list {
		max-height: 500px;
		overflow-y: auto;
		padding-right: 8px;
		min-width: 0;
	}

	.estate-map-heading {
		font-size: 1.2rem;
	}

	.estate-map-item {
		padding: 14px 10px;
	}

	.estate-map-item-button {
		gap: 12px;
		padding: 14px 10px;
	}

	.estate-map-item-image {
		flex-basis: 100px;
		width: 100px;
	}

	.estate-map-item-button {
		gap: 12px;
		padding: 14px 10px;
	}

	.estate-map-item-body {
		gap: 12px;
	}

	.estate-map-item-image {
		flex-basis: 200px;
		width: 110px;
	}

	.estate-map-item-content {
		flex: 1;
		min-width: 0;
	}

	.estate-map-list {
		display: block;
	}
}

/* ==================================================
3. PC（961px以上）
================================================== */

@media (min-width: 961px) {

	.estate-map-wrap {
		display: grid;
		grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
		gap: 24px;
		width: 100%;
		margin: 30px auto;
		align-items: start;
	}

	.estate-map-canvas {
		height: 650px;
		min-height: 400px;
	}

	.estate-map-list {
		max-height: 650px;
		overflow-y: auto;
		padding: 10px;
		min-width: 0;
	}

	.estate-map-heading {
		font-size: 1.25rem;
	}

	.estate-map-item {
		padding: 14px 10px;
	}

	.estate-map-item-body {
		gap: 15px;
	}

	.estate-map-item-image {
		flex-basis: 200px;
		width: 200px;
	}

	.estate-map-item-button {
		gap: 14px;
	}

	.estate-map-list {
		display: block;
	}
}

/* ==================================================
4. タッチ端末ではホバー演出を抑制
================================================== */

@media (hover: none) {

	.estate-map-item:hover {
		background: transparent;
	}

	.estate-map-item.is-active {
		background: #edf8ff;
	}

}

/* ========================================
   ポップアップ：タイトル全幅・下段2列
   スマホ → タブレット → PC
======================================== */
.estate-map-leaflet-popup .leaflet-popup-content {
	width: 300px;
	max-width: calc(100vw - 65px);
	margin: 12px;
}

.estate-map-popup {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.estate-map-popup-title {
	display: block;
	width: 100%;
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #ddd;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.estate-map-popup-body {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	flex-wrap: nowrap;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

/* 左側：物件情報を下寄せ */
.estate-map-popup-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	/* 下寄せ */
	flex: 1 1 0;
	min-width: 0;
	gap: 6px;
	margin-top: auto;
}

.estate-map-popup-labels {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	width: 100%;
}

.estate-map-popup-category,
.estate-map-popup-status {
	flex: 0 0 auto;
	width: fit-content;
	margin-bottom: 0;
}

.estate-map-popup-address {
	width: 100%;
	font-size: 0.8rem;
	overflow-wrap: anywhere;
}

.estate-map-popup .estate-map-item-price {
	display: block;
	width: 100%;
	font-weight: 700;
}

.estate-map-popup-link {
	display: inline-block;
	margin-top: auto;
	padding-top: 5px;
	font-size: 0.85rem;
}

.estate-map-popup-image {
	display: block;
	flex: 0 0 140px;
	width: 90px;
	height: auto;
	aspect-ratio: 4 / 3;
	align-self: flex-end;
	margin: 0;
	overflow: hidden;
	border-radius: 5px;
	background: #f1f1f1;
}

.estate-map-popup-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
}

.estate-map-popup-image.is-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.estate-map-popup-image.is-no-image span {
	font-size: 0.65rem;
	color: #999;
}

@media (min-width: 768px) {
	.estate-map-leaflet-popup .leaflet-popup-content {
		width: 440px;
	}

	.estate-map-popup-title {
		font-size: 1rem;
	}

	.estate-map-popup-body {
		gap: 15px;
	}

	.estate-map-popup-image {
		flex-basis: 200px;
		width: 200px;
	}
}