/* Каталог лікарів — за макетом Figma (група «Лікарі», 1830 px контенту). */

.tmo-doctors {
	--tmo-blue: #739cd2;
	--tmo-coral: #f57a75;
	--tmo-ink: rgba(44, 63, 87, 0.7);
	--tmo-radius: 11px;
	font-family: var(--tmo-font, inherit);
}

/* --- Панель фільтрів --- */

.tmo-doctors__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 25px;
	padding: 32px;
	margin-bottom: 62px;
	background: rgba(115, 156, 210, 0.08);
	border-radius: 22px;
}

.tmo-doctors__search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 540px;
	/* min-width: 0 — інакше поле не стискається і вилазить за панель. */
	min-width: 0;
	max-width: 540px;
	height: 56px;
	padding: 0 20px;
	background: #fff;
	border-radius: var(--tmo-radius);
}

.tmo-doctors__input {
	flex: 1;
	min-width: 0;
	border: 0;
	padding: 0;
	background: transparent;
	font: inherit;
	font-size: 20px;
	color: #2c3f57;
}

.tmo-doctors__input::placeholder {
	color: rgba(44, 63, 87, 0.25);
}

.tmo-doctors__input:focus {
	outline: none;
}

.tmo-doctors__search-icon {
	width: 24px;
	height: 24px;
	flex: none;
	margin-left: 12px;
}

.tmo-doctors__filter {
	position: relative;
	flex: 0 1 auto;
	min-width: 0;
}

.tmo-doctors__toggle {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	min-width: 279px;
	height: 56px;
	padding: 0 16px;
	background: #fff;
	border: 0;
	border-radius: var(--tmo-radius);
	font: inherit;
	font-size: 18px;
	color: var(--tmo-ink);
	text-align: left;
	cursor: pointer;
}

.tmo-doctors__toggle-icon {
	flex: none;
}

.tmo-doctors__toggle [data-tmo-label] {
	flex: 1;
}

.tmo-doctors__filter.is-active .tmo-doctors__toggle {
	color: #2c3f57;
	box-shadow: inset 0 0 0 1px rgba(115, 156, 210, 0.5);
}

.tmo-doctors__arrow {
	flex: none;
	width: 20px;
	height: 20px;
	background: url("img/icon-chevron.svg") no-repeat center / contain;
	transition: transform 0.15s ease;
}

.tmo-doctors__toggle[aria-expanded="true"] .tmo-doctors__arrow {
	transform: rotate(180deg);
}

.tmo-doctors__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	left: 0;
	min-width: 100%;
	max-width: min(90vw, 460px);
	max-height: 340px;
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border-radius: var(--tmo-radius);
	box-shadow: 0 4px 14.8px 7px rgba(115, 156, 210, 0.22);
}

.tmo-doctors__panel[hidden] {
	display: none;
}

.tmo-doctors__option {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 9px 10px;
	border-radius: 6px;
	font-size: 16px;
	line-height: 1.35;
	color: #2c3f57;
	cursor: pointer;
}

.tmo-doctors__option:hover {
	background: rgba(115, 156, 210, 0.1);
}

.tmo-doctors__option input {
	margin-top: 0.25em;
	flex: none;
	accent-color: var(--tmo-blue);
}

.tmo-doctors__reset {
	height: 56px;
	padding: 0 18px;
	background: transparent;
	border: 0;
	border-radius: var(--tmo-radius);
	font: inherit;
	font-size: 16px;
	color: var(--tmo-blue);
	text-decoration: underline;
	cursor: pointer;
}

.tmo-doctors__count {
	margin: -46px 0 24px;
	font-size: 15px;
	color: rgba(44, 63, 87, 0.6);
}

/* --- Картки --- */

.tmo-doctors__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 44px 43px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-doctor[hidden] {
	display: none;
}

.tmo-doctor__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s ease;
}

.tmo-doctor__link:hover,
.tmo-doctor__link:focus-visible {
	box-shadow: 0 4px 14.8px 7px rgba(115, 156, 210, 0.22);
}

.tmo-doctor__photo {
	display: block;
	background: rgba(115, 156, 210, 0.12);
}

.tmo-doctor__photo img {
	display: block;
	width: 100%;
	/* height:auto — інакше атрибут height у розмітці переважає aspect-ratio. */
	height: auto;
	aspect-ratio: 333 / 369;
	object-fit: cover;
	object-position: top center;
}

.tmo-doctor__photo-empty {
	display: block;
	width: 100%;
	aspect-ratio: 333 / 369;
}

.tmo-doctor__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 26px;
}

.tmo-doctor__center {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12.3px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--tmo-coral);
}

.tmo-doctor__center img {
	width: 14px;
	height: 14px;
	flex: none;
}

.tmo-doctor__name {
	font-size: 17.5px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--tmo-blue);
}

.tmo-doctor__position {
	font-size: 13.3px;
	line-height: 1.3;
	color: rgba(0, 0, 0, 0.71);
}

.tmo-doctors__empty[hidden] {
	display: none;
}

.tmo-doctors-empty {
	color: rgba(44, 63, 87, 0.6);
}

/* --- Сторінки каталогу --- */

.tmo-doctors__pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.tmo-doctors__pages[hidden] {
	display: none;
}

.tmo-doctors__page {
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(115, 156, 210, 0.35);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-size: 16px;
	color: var(--tmo-blue-dark);
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.tmo-doctors__page:hover:not(:disabled) {
	border-color: var(--tmo-blue);
	background: rgba(115, 156, 210, 0.12);
}

.tmo-doctors__page.is-active {
	border-color: var(--tmo-blue);
	background: var(--tmo-blue);
	color: #fff;
}

.tmo-doctors__page:disabled {
	opacity: 0.4;
	cursor: default;
}

.tmo-doctors__page--nav {
	font-size: 20px;
	line-height: 1;
}

.tmo-doctors__gap {
	padding: 0 4px;
	color: rgba(44, 63, 87, 0.5);
}

/* --- Сторінка лікаря в розробці --- */

/*
 * Селектор із двох класів — інакше відступи перебиває глобальне правило теми
 * :root :where(.is-layout-flow) > :first-child { margin-block-start: … }.
 */
.tmo-cp-main .tmo-doctor-soon {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	max-width: 640px;
	margin: 100px auto;
	padding: 48px 40px;
	border: 1px solid rgba(115, 156, 210, 0.3);
	border-radius: 24px;
	background: #fff;
	text-align: center;
}

.tmo-doctor-soon__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: rgba(115, 156, 210, 0.14);
	color: var(--tmo-blue);
}

.tmo-doctor-soon__icon svg {
	width: 34px;
	height: 34px;
}

.tmo-doctor-soon__title {
	margin: 0;
	font-size: 28px;
	line-height: 1.25;
	color: var(--tmo-blue-dark);
}

.tmo-doctor-soon__name {
	margin: 0;
	font-size: 19px;
	font-weight: 500;
	color: var(--tmo-blue-muted);
}

.tmo-doctor-soon__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 8px;
}

.tmo-doctor-soon__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 22px;
	border: 2px solid var(--tmo-blue);
	border-radius: 10px;
	background: var(--tmo-blue);
	font-size: 16px;
	font-weight: 500;
	color: #fff;
	text-decoration: none;
}

.tmo-doctor-soon__btn--ghost {
	background: transparent;
	color: var(--tmo-blue-dark);
}

.tmo-doctor-soon__btn:hover {
	border-color: var(--tmo-blue-muted);
	background: var(--tmo-blue-muted);
	color: #fff;
}

@media (max-width: 600px) {
	.tmo-cp-main .tmo-doctor-soon {
		margin: 56px auto;
		padding: 32px 20px;
	}

	.tmo-doctor-soon__title {
		font-size: 23px;
	}
}

/* --- Адаптив --- */

@media (max-width: 1100px) {
	.tmo-doctors__bar {
		padding: 20px;
		gap: 16px;
		margin-bottom: 40px;
	}

	.tmo-doctors__count {
		margin: -28px 0 20px;
	}

	.tmo-doctors__grid {
		gap: 28px 24px;
	}
}

@media (max-width: 600px) {
	.tmo-doctors__bar {
		gap: 12px;
		padding: 16px;
	}

	.tmo-doctors__search {
		flex-basis: 100%;
		max-width: none;
		width: 100%;
		min-width: 0;
	}

	.tmo-doctors__filter {
		flex: 1 1 100%;
		min-width: 0;
	}

	.tmo-doctors__toggle {
		width: 100%;
		min-width: 0;
	}

	.tmo-doctors__grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}
}
