/* [tm_doctors] — filterable directory with embedded OSM map */

.tm-doctors { margin: 1.5em 0; font-size: 0.95rem; }

.tm-doctors__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
	margin-bottom: 0.75em;
}
.tm-doctors__heading { margin: 0; font-size: 1.35rem; }

.tm-doctors__lang { display: inline-flex; gap: 2px; }
.tm-doctors__lang button {
	padding: 0.3em 0.7em;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	background: #fff;
	color: #555;
	border: 1px solid var(--wp--preset--color--rule, #d0d0d0);
	cursor: pointer;
}
.tm-doctors__lang button:first-child { border-radius: 0.25em 0 0 0.25em; }
.tm-doctors__lang button:last-child  { border-radius: 0 0.25em 0.25em 0; }
.tm-doctors__lang button + button { border-left: none; }
.tm-doctors__lang button:hover { background: #f2f2f2; }
.tm-doctors__lang button.is-active {
	background: var(--wp--preset--color--primary, #005fb2);
	color: #fff;
	border-color: var(--wp--preset--color--primary, #005fb2);
}

.tm-doctors__reset,
.tm-doctors__geo {
	align-self: flex-end;
	padding: 0.4em 0.8em;
	font: inherit;
	font-size: 0.8rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--rule, #c4c4c4);
	border-radius: 0.25em;
	cursor: pointer;
	color: #555;
}
.tm-doctors__reset:hover,
.tm-doctors__geo:hover { background: #f4f4f4; }
.tm-doctors__geo.is-active {
	background: var(--wp--preset--color--primary, #005fb2);
	color: #fff;
	border-color: var(--wp--preset--color--primary, #005fb2);
}
.tm-doctors__geo:disabled { opacity: 0.7; cursor: wait; }

.tm-doctors__user-pin span {
	display: block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #2e86de;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px rgba(46, 134, 222, 0.6), 0 0 10px rgba(46, 134, 222, 0.8);
	animation: tm-doctors-pulse 1.8s ease-out infinite;
}
@keyframes tm-doctors-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(46, 134, 222, 0.6), 0 0 10px rgba(46, 134, 222, 0.8); }
	70%  { box-shadow: 0 0 0 14px rgba(46, 134, 222, 0), 0 0 10px rgba(46, 134, 222, 0.4); }
	100% { box-shadow: 0 0 0 0 rgba(46, 134, 222, 0), 0 0 10px rgba(46, 134, 222, 0.8); }
}
.tm-doctors__source { font-size: 0.8rem; color: #888; margin-top: 1em; }

.tm-doctors__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em 1em;
	align-items: flex-end;
	margin-bottom: 1em;
	padding: 0.75em 1em;
	background: var(--wp--preset--color--base-2, #f6f6f6);
	border: 1px solid var(--wp--preset--color--rule, #e3e3e3);
	border-radius: 0.5em;
}

.tm-doctors__filter {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	min-width: 10em;
}

.tm-doctors__filter--search { flex: 1; min-width: 14em; }
.tm-doctors__filter--multi  { min-width: 16em; flex: 1; position: relative; }

.tm-doctors__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	padding: 0.3em 0.4em;
	border: 1px solid var(--wp--preset--color--rule, #c4c4c4);
	border-radius: 0.25em;
	background: #fff;
	min-height: 2.2em;
	cursor: text;
}
.tm-doctors__chips:focus-within {
	outline: 2px solid rgba(0, 95, 178, 0.3);
	outline-offset: 1px;
}
.tm-doctors__chips-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tm-doctors__chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 4px 2px 8px;
	font-size: 0.8rem;
	background: #e8f4ff;
	color: #005fb2;
	border-radius: 999px;
	line-height: 1.4;
}
.tm-doctors__chip button {
	background: none;
	border: none;
	color: inherit;
	font-size: 1.1em;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: 0.7;
}
.tm-doctors__chip button:hover { opacity: 1; }
.tm-doctors__chips-input {
	flex: 1;
	min-width: 8em;
	padding: 0.15em 0.25em;
	border: none;
	outline: none;
	font: inherit;
	background: transparent;
}

.tm-doctors__dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 2px;
	max-height: 280px;
	overflow-y: auto;
	z-index: 1001;
	background: #fff;
	border: 1px solid var(--wp--preset--color--rule, #c4c4c4);
	border-radius: 0.25em;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	padding: 0.25em 0;
}
.tm-doctors__opt {
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.3em 0.75em;
	font-size: 0.88rem;
	cursor: pointer;
}
.tm-doctors__opt:hover { background: #f4f7fb; }
.tm-doctors__opt input { margin: 0; }
.tm-doctors__opt-empty,
.tm-doctors__opt-more {
	padding: 0.4em 0.75em;
	font-size: 0.85rem;
	color: #888;
	text-align: center;
}

.tm-doctors__filter > span {
	font-size: 0.8rem;
	color: var(--wp--preset--color--muted, #666);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.tm-doctors__filter select,
.tm-doctors__filter input[type="search"] {
	padding: 0.4em 0.6em;
	border: 1px solid var(--wp--preset--color--rule, #c4c4c4);
	border-radius: 0.25em;
	background: #fff;
	font: inherit;
}

.tm-doctors__count {
	margin-left: auto;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted, #666);
}

/* Two-column layout: list + map */
.tm-doctors__layout {
	display: grid;
	grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.2fr);
	gap: 1em;
	align-items: start;
}

.tm-doctors__list {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	max-height: 70vh;
	overflow-y: auto;
	padding-right: 0.25em;
}

.tm-doctors__map-wrap {
	position: sticky;
	top: 1em;
}

.tm-doctors__map {
	height: 70vh;
	border-radius: 0.5em;
	border: 1px solid var(--wp--preset--color--rule, #e3e3e3);
	background: #eef;
}

/* Card */
.tm-doctors__card {
	padding: 0.75em 1em;
	border: 1px solid var(--wp--preset--color--rule, #e3e3e3);
	border-radius: 0.5em;
	background: #fff;
	transition: box-shadow .15s, border-color .15s;
}

.tm-doctors__card.is-active {
	border-color: var(--wp--preset--color--primary, #005fb2);
	box-shadow: 0 0 0 2px rgba(0,95,178,.15);
}

.tm-doctors__card header {
	display: flex;
	justify-content: space-between;
	gap: 0.5em;
	align-items: baseline;
	margin-bottom: 0.25em;
}

.tm-doctors__name {
	font-weight: 600;
	color: inherit;
	text-decoration: none;
}

.tm-doctors__name:hover { text-decoration: underline; }

.tm-doctors__type {
	font-size: 0.7rem;
	padding: 0.1em 0.5em;
	border-radius: 999px;
	background: var(--wp--preset--color--base-2, #eef0f2);
	color: var(--wp--preset--color--muted, #666);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.tm-doctors__type[data-type="clinic"] { background: #e8f4ff; color: #005fb2; }

.tm-doctors__specialties { font-size: 0.9rem; }
.tm-doctors__languages  { font-size: 0.85rem; color: var(--wp--preset--color--muted, #666); margin-top: 0.15em; }

.tm-doctors__addresses {
	list-style: none;
	margin: 0.5em 0 0 0;
	padding: 0;
	font-size: 0.85rem;
}

.tm-doctors__addresses li { margin: 0.15em 0; }
.tm-doctors__addresses li[data-has-coords="1"] { cursor: pointer; color: var(--wp--preset--color--primary, #005fb2); }
.tm-doctors__addresses li[data-has-coords="1"]:hover { text-decoration: underline; }

.tm-doctors__services {
	list-style: none;
	margin: 0.5em 0 0 0;
	padding: 0;
	font-size: 0.82rem;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.tm-doctors__services li {
	display: flex;
	justify-content: space-between;
	gap: 0.5em;
	align-items: baseline;
	padding: 2px 0;
	border-top: 1px dashed #e6e6e8;
}
.tm-doctors__services li:first-child { border-top: none; }
.tm-doctors__services li span { color: #333; flex: 1; }
.tm-doctors__services li em {
	font-style: normal;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #005fb2);
	white-space: nowrap;
}
.tm-doctors__services-more { color: #888; font-size: 0.8rem; }

.tm-doctors__meta {
	font-size: 0.8rem;
	color: var(--wp--preset--color--muted, #666);
	margin-top: 0.35em;
}

.tm-doctors__cta {
	display: inline-block;
	margin-top: 0.5em;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #005fb2);
	text-decoration: none;
}
.tm-doctors__cta:hover { text-decoration: underline; }

.tm-doctors__empty-msg {
	padding: 1em;
	text-align: center;
	color: var(--wp--preset--color--muted, #666);
}

.tm-doctors--error,
.tm-doctors--empty {
	padding: 1em;
	background: #fff4f4;
	border: 1px solid #f3c1c1;
	border-radius: 0.25em;
	color: #7a1f1f;
}

/* Leaflet popup with doctor list */
.tm-doctors__popup ul { margin: 0.25em 0 0 1em; padding: 0; font-size: 0.85rem; }
.tm-doctors__popup a  { color: var(--wp--preset--color--primary, #005fb2); }

@media (max-width: 900px) {
	.tm-doctors__layout { grid-template-columns: 1fr; }
	.tm-doctors__map-wrap { position: static; order: -1; }
	.tm-doctors__list { max-height: none; }
	.tm-doctors__map { height: 50vh; }
}
