/**
 * MMPU - Styling container peta & popup card (gold/ink palette).
 */

.mmpu-map {
	width: 100%;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #d8d0c0;
	background: #f4f1ea;
	position: relative;
	z-index: 0;
}

.mmpu-map-empty {
	margin: 0;
	padding: 24px;
	text-align: center;
	color: #6b6459;
	font-style: italic;
}

.mmpu-popup-basic {
	font-size: 14px;
	line-height: 1.4;
}


.mmpu-popup-card {
	font-family: var(--mmpu-popup-body-font-family, inherit);
	font-size: var(--mmpu-popup-body-font-size, 12px);
	color: var(--mmpu-popup-body-color, #2b2620);
	width: 220px;
}

.mmpu-popup-photo {
	margin: -12px -20px 10px -20px; /* imbangi padding bawaan .leaflet-popup-content-wrapper */
	overflow: hidden;
}

.mmpu-popup-photo img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	display: block;
	border-radius: 8px 8px 0 0; /* ikut radius pojok atas window popup (.leaflet-popup-content-wrapper) */
}

.mmpu-popup-title {
	font-family: var(--mmpu-popup-title-font-family, 'Calistoga', Georgia, serif);
	font-size: var(--mmpu-popup-title-font-size, 16px);
	font-weight: 700;
	color: var(--mmpu-popup-title-color, #2b2620);
	margin-bottom: 4px;
	line-height: 1.25;
}

.mmpu-popup-distance {
	font-size: 1em;
	color: #6b6459;
	margin-bottom: 6px;
}

.mmpu-popup-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.mmpu-popup-links {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mmpu-popup-link-btn,
.mmpu-popup-link-btn:link,
.mmpu-popup-link-btn:visited,
.mmpu-popup-link-btn:hover,
.mmpu-popup-link-btn:focus,
.mmpu-popup-link-btn:active {
	display: flex;
	align-items: center;
	gap: 8px;
	text-align: left;
	padding: 7px 10px;
	background: var(--mmpu-btn-bg, #c9a227);
	color: var(--mmpu-btn-text-color, #2b2620) !important;
	font-weight: 600;
	font-size: var(--mmpu-btn-text-size, 12px);
	border-radius: 6px;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.mmpu-popup-link-btn:hover,
.mmpu-popup-link-btn:focus {
	background: var(--mmpu-btn-bg-hover, #b58f1f);
	color: var(--mmpu-btn-text-color, #2b2620) !important;
}

.mmpu-popup-link-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	border-style: solid;
	border-width: 1px;
	border-color: #e5e7eb;
	background: #ffffff;
	overflow: hidden;
}

.mmpu-popup-link-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.mmpu-popup-link-icon-generic {
	background: #6b7280; /* latar netral supaya icon globe putih (fallback) tetap terlihat */
}

.mmpu-popup-link-label,
.mmpu-popup-link-arrow {
	color: inherit;
	text-decoration: none !important;
}

.mmpu-popup-link-label {
	flex: 1;
}

.mmpu-popup-link-arrow {
	flex-shrink: 0;
	font-weight: 700;
	opacity: 0.85;
}

.leaflet-popup-content-wrapper {
	border-radius: 8px;
	position: relative;
}

.leaflet-popup-content {
	margin: 12px 20px;
}

/* Tombol close (×) — sejak v1.4.0 dibuat pure CSS (2 garis diputar),
   bukan karakter teks, supaya bisa dikasih background yang kelihatan
   jelas di atas foto/background gelap. closeButton bawaan Leaflet
   dimatikan (closeButton:false di JS), diganti elemen ini yang
   di-render sebagai bagian dari konten popup. */
.mmpu-popup-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	padding: 0;
	margin: 0;
	border: none;
	cursor: pointer;
	background: var(--mmpu-close-bg, #ffffff);
	border-radius: var(--mmpu-close-radius, 12px);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.35 );
	z-index: 20;
}

.mmpu-popup-close-x {
	position: relative;
	width: var(--mmpu-close-x-size, 11px);
	height: var(--mmpu-close-x-size, 11px);
	display: block;
}

.mmpu-popup-close-x::before,
.mmpu-popup-close-x::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: var(--mmpu-close-x-color, #2b2620);
}

.mmpu-popup-close-x::before {
	transform: translateY( -50% ) rotate( 45deg );
}

.mmpu-popup-close-x::after {
	transform: translateY( -50% ) rotate( -45deg );
}

.mmpu-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 10px;
	font-size: 0.9em;
	font-weight: 600;
	color: #fff;
	letter-spacing: 0.2px;
}

/* Marker berbentuk lingkaran berwarna sesuai kategori jarak (divIcon).
   Sejak v1.3.0 bisa berisi icon FontAwesome (<i>) atau gambar (<img>)
   di tengahnya, sesuai Pengaturan MMPU > Pengaturan Icon Marker —
   ukurannya sendiri di-set inline lewat JS (mengikuti setting admin). */
.mmpu-marker-icon {
	background: transparent;
	border: none;
}

.mmpu-marker-dot {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.4 );
}

.mmpu-marker-dot i {
	color: #ffffff;
	line-height: 1;
}

.mmpu-marker-dot img {
	width: 65%;
	height: 65%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

/* Bentuk pin/teardrop untuk marker Hotel (opsional, sejak v1.4.0) —
   proporsi wrapper:shape:height sudah diverifikasi lewat rendering test
   supaya ujung lancip pin presisi menunjuk ke titik koordinat (anchor
   dihitung di JS berdasarkan proporsi yang sama). Teknik: kotak diberi
   border-radius di 3 sudut + rotate -45deg, isi icon di-counter-rotate
   supaya tetap tegak. */
.mmpu-marker-icon-pin {
	background: transparent;
	border: none;
}

.mmpu-marker-pin-wrap {
	position: relative;
	display: block;
}

.mmpu-marker-pin {
	position: absolute;
	left: 50%;
	top: 50%;
	border: 2px solid #ffffff;
	border-radius: 50% 50% 50% 0;
	transform: translate( -50%, -50% ) rotate( -45deg );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.4 );
	display: flex;
	align-items: center;
	justify-content: center;
}

.mmpu-marker-pin-inner {
	width: 100%;
	height: 100%;
	transform: rotate( 45deg );
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	line-height: 1;
}

.mmpu-marker-pin-inner img {
	width: 50%;
	height: 50%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

/* Marker landmark/POI (v1.2.0) — lingkaran berwarna sesuai kategori,
   sedikit lebih kecil dari marker hotel, berisi glyph SVG di tengah
   (atau icon FontAwesome/gambar custom sejak v1.3.0 kalau di-override
   lewat Pengaturan MMPU). */
.mmpu-landmark-icon {
	background: transparent;
	border: none;
}

.mmpu-landmark-dot {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.4 );
}

.mmpu-landmark-dot svg {
	display: block;
	pointer-events: none;
}

.mmpu-landmark-dot i {
	color: #ffffff;
	line-height: 1;
}

.mmpu-landmark-dot img {
	width: 65%;
	height: 65%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

.mmpu-popup-landmark-desc {
	font-size: 12px;
	color: #4a453d;
	line-height: 1.5;
	margin-top: 2px;
}

/* Tombol fullscreen custom (Tahap 6) */
.mmpu-fullscreen-control {
	background: #fff;
}

.mmpu-fullscreen-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	font-size: 16px;
	text-decoration: none;
	color: #2b2620;
	cursor: pointer;
}

.mmpu-fullscreen-link:hover {
	background: #f4f1ea;
}

/* Fallback pseudo-fullscreen untuk browser yang tidak dukung
   Fullscreen API penuh (misal beberapa versi Safari iOS). */
.mmpu-map.mmpu-map-fullscreen {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw !important;
	height: 100vh !important;
	z-index: 100000;
	border-radius: 0;
	border: none;
}

/* Saat native Fullscreen API aktif, browser otomatis membuat elemen
   mengisi seluruh layar — pastikan tinggi peta ikut menyesuaikan. */
.mmpu-map:fullscreen,
.mmpu-map:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
}
