/**
 * Dealers archive — Google Maps (API) layout & InfoWindow chrome.
 *
 * @package mangosteen-theme
 */

/* ---------- Archive list: text-only luxury cards ---------- */
.post-type-archive-dealers .dealers-list .dealer.dealer--archive {
	display: block;
	margin: 0;
	padding: 0;
	border: none;
	border-bottom: 1px solid var(--c-line, #1f1f1f);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	transform: none;
	cursor: default;
	transition:
		border-color 0.45s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)),
		background-color 0.45s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}

.post-type-archive-dealers .dealers-list .dealer.dealer--archive:hover {
	transform: none;
	box-shadow: none;
	border-color: rgba(200, 164, 93, 0.14);
	background: rgba(200, 164, 93, 0.02);
}

.post-type-archive-dealers .dealers-list .dealer.dealer--archive.is-map-hover {
	border-color: rgba(200, 164, 93, 0.22);
	background: rgba(200, 164, 93, 0.035);
}

.post-type-archive-dealers .dealers-list .dealer.dealer--archive.is-map-active {
	border-color: rgba(212, 175, 55, 0.38);
	background: rgba(200, 164, 93, 0.06);
	box-shadow: inset 3px 0 0 rgba(212, 175, 55, 0.55);
}

.post-type-archive-dealers .dealers-list .dealer.dealer--archive .dealer__inner {
	max-width: 44rem;
	padding: 32px 40px 30px;
	margin: 0 auto 0 0;
}

.post-type-archive-dealers .dealers-list .dealer__eyebrow {
	margin: 0 0 14px;
	font-family: var(--ff-en, "Inter", system-ui, sans-serif);
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.42em;
	text-transform: uppercase;
	color: rgba(200, 164, 93, 0.75);
	line-height: 1.4;
}

.post-type-archive-dealers .dealers-list .dealer--rank-expert .dealer__eyebrow {
	color: rgba(212, 181, 110, 0.88);
}

.post-type-archive-dealers .dealers-list .dealer__name {
	margin: 0 0 16px;
	font-family: var(--ff-display, "DIN Condensed", DINCondensed, sans-serif);
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 300;
	letter-spacing: 0.04em;
	line-height: 1.2;
	color: var(--c-white, #fff);
}

.post-type-archive-dealers .dealers-list .dealer__addr {
	margin: 0 0 22px;
	font-family: var(--ff-jp, "M PLUS 1p", sans-serif);
	font-size: 12px;
	line-height: 1.85;
	letter-spacing: 0.06em;
	color: var(--c-text-mute, #8a8a8a);
	max-width: 36em;
}

.post-type-archive-dealers .dealers-list .dealer__detail {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 2px;
	font-family: var(--ff-en, "Inter", system-ui, sans-serif);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	text-decoration: none;
	color: rgba(200, 164, 93, 0.55);
	border: none;
	border-bottom: 1px solid rgba(200, 164, 93, 0.22);
	padding-bottom: 3px;
	transition:
		color 0.35s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)),
		border-color 0.35s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)),
		text-shadow 0.35s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}

.post-type-archive-dealers .dealers-list .dealer__detail:hover {
	color: #c8a45d;
	border-bottom-color: rgba(200, 164, 93, 0.55);
	text-shadow: 0 0 18px rgba(200, 164, 93, 0.22);
}

.post-type-archive-dealers .dealers-list .dealer__detail-arrow {
	display: inline-block;
	width: 0.35em;
	height: 0.35em;
	margin-bottom: 1px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(-45deg);
	opacity: 0.75;
	transition: transform 0.35s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)), opacity 0.35s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}

.post-type-archive-dealers .dealers-list .dealer__detail:hover .dealer__detail-arrow {
	transform: rotate(-45deg) translate(2px, -2px);
	opacity: 1;
}

.post-type-archive-dealers .dealer-rank__head {
	padding: 28px 40px 22px;
}

/* ---------- Dealer list scroll shell (archive only) ---------- */
.post-type-archive-dealers .dealers-list-wrap {
	position: relative;
	min-height: 0;
}

.post-type-archive-dealers .dealers-list-fade {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 2;
	height: 52px;
	pointer-events: none;
}

.post-type-archive-dealers .dealers-list-fade--top {
	top: 0;
	background: linear-gradient(
		to bottom,
		rgba(11, 11, 11, 0.92) 0%,
		rgba(11, 11, 11, 0.45) 45%,
		transparent 100%
	);
}

.post-type-archive-dealers .dealers-list-fade--bottom {
	bottom: 0;
	background: linear-gradient(
		to top,
		rgba(11, 11, 11, 0.92) 0%,
		rgba(11, 11, 11, 0.45) 45%,
		transparent 100%
	);
}

.post-type-archive-dealers .dealers-list {
	max-height: none;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}

.post-type-archive-dealers .dealers-list::-webkit-scrollbar {
	width: 5px;
}

.post-type-archive-dealers .dealers-list::-webkit-scrollbar-track {
	background: transparent;
}

.post-type-archive-dealers .dealers-list::-webkit-scrollbar-thumb {
	background: rgba(212, 175, 55, 0.18);
	border-radius: 6px;
	transition: background 0.4s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}

.post-type-archive-dealers .dealers-list-wrap:hover .dealers-list::-webkit-scrollbar-thumb,
.post-type-archive-dealers .dealers-list:focus-within::-webkit-scrollbar-thumb {
	background: rgba(212, 175, 55, 0.5);
}

.post-type-archive-dealers .dealers-list::-webkit-scrollbar-thumb:hover {
	background: rgba(212, 175, 55, 0.65);
}

.post-type-archive-dealers .dealers-list-wrap:hover .dealers-list,
.post-type-archive-dealers .dealers-list:focus-within {
	scrollbar-color: rgba(212, 175, 55, 0.5) transparent;
}

@media (min-width: 1081px) {
	.post-type-archive-dealers .dealers-list-wrap {
		max-height: 70vh;
		overflow: hidden;
	}

	.post-type-archive-dealers .dealers-list {
		max-height: 70vh;
		overflow-y: auto;
		overflow-x: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-behavior: smooth;
	}
}

/* ---------- API map shell (replaces iframe / placeholder) ---------- */
.dealers-map.dealers-map--api {
	position: relative;
	display: block;
	min-height: 70vh;
	height: 70vh;
	background: #1a1a1a;
	overflow: hidden;
}

.dealers-map.dealers-map--api::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(
		ellipse 100% 95% at 50% 50%,
		transparent 52%,
		rgba(0, 0, 0, 0.14) 100%
	);
}

/* style.css のプレースホルダー用 vignette のみ非表示（.pin はモック同様に表示） */
.dealers-map.dealers-map--api::after {
	display: none !important;
}

.dealers-map.dealers-map--api .pin {
	pointer-events: none;
	z-index: 2;
}

.dealer-map__canvas {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	min-height: 420px;
	touch-action: manipulation;
}

.dealers-map--api-error .dealer-map__canvas[hidden] {
	display: none !important;
	visibility: hidden;
}

.dealer-map__error {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	background: #050505;
	color: #c8a45d;
	font-family: var(--ff-en, "Inter", system-ui, sans-serif);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.38em;
	text-transform: uppercase;
}

.dealer-map__error[hidden] {
	display: none !important;
}

/* ---------- Google InfoWindow chrome (dark / gold) ---------- */
.gm-style .gm-style-iw-c {
	padding: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #080808 !important;
}

.gm-style .gm-style-iw-d {
	overflow: hidden !important;
	max-height: none !important;
}

.gm-style .gm-style-iw-tc::after {
	background: #080808 !important;
}

.gm-style .gm-ui-hover-effect {
	opacity: 0.55 !important;
	filter: invert(1);
}

.mgst-dealer-iw {
	padding: 16px 18px 18px;
	background: #080808;
	color: #d0d0d0;
	max-width: 260px;
	box-sizing: border-box;
	border: 1px solid rgba(200, 164, 93, 0.38);
}

.mgst-dealer-iw__title {
	margin: 0 0 8px;
	font-family: var(--ff-display, "DIN Condensed", DINCondensed, "Bebas Neue", sans-serif);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.35;
	color: #f4f4f4;
}

.mgst-dealer-iw__addr {
	margin: 0 0 14px;
	font-size: 12px;
	line-height: 1.65;
	color: #888;
}

.mgst-dealer-iw__link {
	display: inline-block;
	font-family: var(--ff-en, "Inter", system-ui, sans-serif);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #c8a45d !important;
	text-decoration: none;
	border-bottom: 1px solid rgba(200, 164, 93, 0.45);
	padding-bottom: 2px;
}

.mgst-dealer-iw__link:hover {
	color: #e4c77a !important;
	border-bottom-color: rgba(200, 164, 93, 0.75);
}

/* ---------- Mobile: stack + height (matches .dealers-layout break) ---------- */
@media (max-width: 1080px) {
	.post-type-archive-dealers .dealers-list-wrap {
		max-height: none;
		overflow: visible;
	}

	.post-type-archive-dealers .dealers-list-fade {
		display: none;
	}

	.post-type-archive-dealers .dealers-list {
		max-height: none;
		overflow: visible;
		scrollbar-color: rgba(212, 175, 55, 0.35) transparent;
	}

	.post-type-archive-dealers .dealers-list::-webkit-scrollbar-thumb {
		background: rgba(212, 175, 55, 0.35);
	}

	.post-type-archive-dealers .dealers-list .dealer.dealer--archive .dealer__inner {
		padding: 26px 24px 24px;
		max-width: none;
	}

	.post-type-archive-dealers .dealers-list .dealer__name {
		font-size: clamp(20px, 5.2vw, 26px);
	}

	.dealers-map.dealers-map--api {
		height: 46vh;
		min-height: 300px;
		max-height: 480px;
		border-top: 1px solid var(--c-line, rgba(255, 255, 255, 0.08));
	}

	.dealer-map__canvas {
		min-height: 280px;
	}
}

@media (max-width: 720px) {
	.post-type-archive-dealers .dealers-list .dealer.dealer--archive .dealer__inner {
		padding: 22px 20px 20px;
	}

	.post-type-archive-dealers .dealers-list .dealer__addr {
		font-size: 11px;
		margin-bottom: 18px;
	}

	.dealers-map.dealers-map--api {
		height: 42vh;
		min-height: 260px;
		max-height: 420px;
	}
}
