/* Medimat Map Plugin — Frontend Styles */

.medimat-map {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #1A1A1A;
	line-height: 1.6;
}

/* Tabs */
.medimat-map__tabs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 40px;
}

.medimat-map__tab {
	padding: 12px 28px;
	border-radius: 50px;
	font-size: .9rem;
	font-weight: 600;
	border: 2px solid #1D73BE !important;
	background: #fff !important;
	color: #1D73BE !important;
	cursor: pointer;
	transition: all .3s;
	display: flex;
	align-items: center;
	gap: 8px;
}

.medimat-map__tab svg {
	width: 18px;
	height: 18px;
	color: #1D73BE !important;
}

.medimat-map__tab:hover {
	background: rgba(29,115,190,.08) !important;
}

.medimat-map__tab.active {
	background: #1D73BE !important;
	color: #fff !important;
	border-color: #1D73BE !important;
}

.medimat-map__tab.active svg {
	color: #fff !important;
}

/* Map + Sidebar grid */
.medimat-map__wrapper {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 24px;
	align-items: start;
}

.medimat-map__svg-wrap {
	position: relative;
	overflow: hidden;
	min-width: 0;
}

.medimat-map__svg-wrap svg {
	width: 100%;
	height: auto;
	display: block;
}

/* District paths */
.medimat-map .district {
	fill: #E8F2FB;
	stroke: #fff;
	stroke-width: 1;
	cursor: pointer;
	transition: fill-opacity .2s, fill .15s, filter .2s;
}

.medimat-map .district:hover {
	stroke: #0B2447;
	stroke-width: 1.5;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
}

/* Tooltip */
.medimat-map__tooltip {
	position: fixed;
	z-index: 10000;
	background: #fff;
	border-radius: 14px;
	padding: 20px 24px;
	box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s;
	min-width: 260px;
	max-width: 340px;
}

.medimat-map__tooltip.visible {
	opacity: 1;
}

.medimat-map__tooltip .tt-district {
	font-weight: 700;
	font-size: 1.1rem;
	color: #0B2447;
	margin-bottom: 6px;
}

.medimat-map__tooltip .tt-name {
	font-weight: 700;
	color: #1A1A1A;
	font-size: .95rem;
	margin-bottom: 4px;
}

.medimat-map__tooltip .tt-phone {
	color: #1D73BE;
	font-weight: 600;
	font-size: .9rem;
}

.medimat-map__tooltip .tt-note {
	color: #5A5A5A;
	font-size: .85rem;
}

/* Sidebar */
.medimat-map__sidebar {
	background: #FAFAF7;
	border-radius: 16px;
	padding: 20px;
	max-height: 480px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid rgba(0,0,0,.04);
}

.medimat-map__sidebar h4 {
	font-size: 1rem;
	color: #0B2447;
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.medimat-map__sidebar h4 svg {
	width: 20px;
	height: 20px;
	color: #1D73BE;
}

/* Sidebar contacts */
.medimat-map__contact {
	padding: 14px 16px;
	border-radius: 10px;
	background: #fff;
	margin-bottom: 8px;
	border: 1px solid rgba(0,0,0,.04);
	cursor: pointer;
	transition: all .2s;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.medimat-map__contact:hover,
.medimat-map__contact.active {
	border-color: #1D73BE;
	box-shadow: 0 4px 16px rgba(29,115,190,.1);
}

.medimat-map__contact-color {
	display: block;
	width: 6px;
	border-radius: 3px;
	flex-shrink: 0;
	align-self: stretch;
	min-height: 40px;
}

.medimat-map__contact-name {
	font-weight: 700;
	font-size: .88rem;
	color: #0B2447;
	margin-bottom: 2px;
}

.medimat-map__contact-phone {
	font-size: .82rem;
	color: #1D73BE;
	font-weight: 500;
	margin-bottom: 4px;
}

.medimat-map__contact-districts {
	font-size: .72rem;
	color: #5A5A5A;
	line-height: 1.4;
}

/* Responsive */
@media (max-width: 1024px) {
	.medimat-map__wrapper {
		grid-template-columns: 1fr;
	}
	.medimat-map__sidebar {
		max-height: 300px;
	}
}

@media (max-width: 768px) {
	.medimat-map__tooltip {
		display: none !important;
	}
	.medimat-map__tabs {
		flex-direction: column;
		align-items: center;
	}
}
