/* ── Layout ───────────────────────────────────────────────────────────────── */

.mnp-dept-search-wrapper {
	display: flex;
	gap: 1.5rem;
	flex-direction: column;
}

.mnp-dept-search-wrapper h2.wp-block-heading {
	margin-top: 0;
}

.mnp-dept-search-form {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

@media (min-width:980px) {
	.mnp-dept-search-wrapper {
		flex-direction: row;
	}
}

/* ── Search field ─────────────────────────────────────────────────────────── */

.mnp-dept-input-row {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	position: relative;
}

.mnp-dept-input {
	width: 200px;
	padding: .45rem .7rem;
	font-size: var(--wp--preset--font-size--medium);
	border: 1px solid #bbb;
	border-radius: 4px;
}

.mnp-dept-input:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Spinner (CSS-only ring) */
.mnp-dept-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 3px solid rgba(0,0,0,.15);
	border-top-color: var(--wp--preset--color--quinternary);
	border-radius: 50%;
	animation: mnp-spin .6s linear infinite;
}
@keyframes mnp-spin { to { transform: rotate(360deg); } }

.mnp-dept-spinner {
	position: absolute;
	top: 100px;
	opacity: 1;
	transition: opacity .25s ease;
}

.mnp-dept-spinner.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Autocomplete suggestions */
.mnp-dept-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	width: 280px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
	background: var(--wp--preset--color--quinternary);
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	max-height: 260px;
	overflow-y: auto;
}

.mnp-dept-suggestions li {
	padding: .45rem .75rem;
	cursor: pointer;
	font-size: .95rem;
}

.mnp-dept-suggestions li:hover,
.mnp-dept-suggestions li:focus {
	background: #f0f0f0;
	outline: none;
}

.mnp-dept-error {
	background-color: #c0392b;
	color: var(--wp--preset--color--quinternary);
	font-style: italic;
	padding: .5em 1em;
}

/* ── SVG Map ──────────────────────────────────────────────────────────────── */

.mnp-dept-map {
	max-width: 600px;
	width: 100%;
	margin: 0 auto;
}

.mnp-france-map {
	width: 100%;
	height: auto;
	max-height: 500px;
	display: block;
}

/* Default department fill */
.mnp-france-map path[data-dept] {
	fill: #ffffff80;
	/*stroke: var(--wp--preset--color--quinternary);
	stroke-width: 1.5;*/
	transition: fill .15s ease;
}

/* Hover */
.mnp-france-map path[data-dept]:hover {
	fill: #ffffff;
	outline: none;
}

/* Active / selected */
.mnp-france-map path[data-dept]:focus,
.mnp-france-map path[data-dept].mnp-dept-active {
	fill: var(--wp--preset--color--tertiary);
}

/* ── Results ──────────────────────────────────────────────────────────────── */

.mnp-dept-results .hotspot-info {
	margin-top: 1rem;
	position: relative;
	margin-right: 1.25rem;
}

.mnp-dept-results .hotspot-info::before {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 1.25rem;
	left: 1.25rem;
	border: 1px solid var(--wp--preset--color--tertiary);
}

.mnp-dept-results .hotspot-info .hotspot-content {
	position: relative;
	padding: 2rem;
}

.mnp-dept-results .hotspot-info .hotspot-content > div {
	position: relative;
	z-index: 1;
}

.mnp-dept-results .hotspot-info .hotspot-content .contact {
	display: flex;
	flex-direction: column;
	row-gap: .25em;
	margin: 0;
}

.mnp-dept-results .hotspot-info .hotspot-content .contact + p:has(strong) {
	margin-top: 2em;
}

.mnp-dept-results .hotspot-info .hotspot-content .wp-block-heading {
	text-transform: initial;
	font-size: initial;
}