/**
 * Inline checkout map picker. Brand purple #4d0f5c, same card language as the
 * rest of the checkout.
 */

.psf-map-card {
	border: 1px solid #e6e1ea;
	border-radius: 14px;
	padding: 16px;
	margin: 0 0 18px;
	background: #fff;
}

.psf-map-card.is-set { border-color: #cdb6d4; }

.psf-map-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.psf-map-card__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: #2b1330;
	font-size: 15px;
}

.psf-map-card__title svg { color: #4d0f5c; flex: 0 0 auto; }

.psf-map-card__badge {
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	background: #f3eef5;
	color: #7a6b80;
	white-space: nowrap;
}

.psf-map-card.is-set .psf-map-card__badge {
	background: #e7f6ec;
	color: #1d7a43;
}

/* The map itself ------------------------------------------------------- */

.psf-map-inline {
	position: relative;
	height: 320px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e6e1ea;
	background: #eef0f2;
}

.psf-map-inline .maplibregl-canvas { outline: none; }

/* Persian labels are shaped by the RTL plugin, but the controls themselves
   are latin-ish UI and read better left-to-right. */
.psf-map-inline .maplibregl-ctrl-group { direction: ltr; }

/* The pin never moves: the map slides under it — the pattern every Iranian
   delivery app uses, and it needs no tap target on the marker. */
.psf-map-inline__pin {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -100%);
	pointer-events: none;
	z-index: 1100;
	filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35));
	transition: transform .12s ease;
}

.psf-map-inline.is-moving .psf-map-inline__pin { transform: translate(-50%, -118%); }

.psf-map-inline__gps {
	position: absolute;
	inset-inline-end: 12px;
	bottom: 12px;
	z-index: 1100;
	width: 42px;
	height: 42px;
	min-width: 0;
	min-height: 0;
	padding: 0;
	border-radius: 50%;
	border: 0;
	background: #fff;
	color: #4d0f5c;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.psf-map-inline__gps.is-busy { opacity: .6; cursor: progress; }

.psf-map-inline__hint {
	position: absolute;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1100;
	background: rgba(28, 10, 33, .78);
	color: #fff;
	font-size: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
	pointer-events: none;
	transition: opacity .25s ease;
}

.psf-map-inline__hint.is-hidden { opacity: 0; }

/* Address read-out ------------------------------------------------------ */

.psf-map-card__live {
	margin-top: 12px;
	padding: 11px 13px;
	border-radius: 10px;
	background: #f8f5f9;
	font-size: 13px;
	line-height: 1.9;
	color: #3b2a41;
	min-height: 44px;
}

.psf-map-card__live.is-loading { color: #9b8fa1; }

.psf-map-card.is-set .psf-map-card__live {
	background: #f2faf5;
	color: #235c3c;
}

.psf-map-card__error {
	margin: 10px 0 0;
	font-size: 13px;
	color: #c0261c;
}

/* Merged province + city box ------------------------------------------- */

#psf_city_combo_field .psf-combo {
	display: block;
	width: 100%;
	background: #f8f5f9;
	cursor: default;
}

#psf_city_combo_field .description {
	margin-top: 6px;
	font-size: 12px;
	color: #8a7f8f;
}

/* The real state/city inputs stay in the form for WooCommerce, but the
   customer only ever sees the merged box above. */
#billing_state_field,
#billing_city_field {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	margin: -1px;
	padding: 0;
	border: 0;
}

@media (max-width: 767px) {
	.psf-map-inline { height: 260px; }
	.psf-map-card { padding: 13px; }
}

/* Confine Leaflet pane z-indexes so the map never paints over fixed bars/nav. */
.psf-map-inline { isolation: isolate; }
