/*
 * Сторінка «Контакти».
 * Основа — дизайн-система сторінки центру (center.css, класи tmo-cp-*),
 * тут лише власні блоки: картки, довідник, звернення, список центрів із картою.
 */

.tmo-ct-hero .tmo-cp-hero__title,
.tmo-ct-hero .tmo-cp-hero__subtitle {
	max-width: 900px;
}

.tmo-ct-hero .tmo-cp-btn--coral .tmo-icon {
	transform: none;
}

/* ------------------------------------------------------ Основні контакти */

.tmo-ct-section--cards {
	padding-top: 56px;
}

.tmo-ct-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ct-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 26px 26px 24px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-radius);
	background: var(--tmo-page, #f8f8f8);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tmo-ct-card:hover {
	border-color: rgba(115, 156, 210, 0.6);
	box-shadow: var(--cp-shadow);
	transform: translateY(-2px);
}

.tmo-ct-card__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-bottom: 12px;
	border-radius: 12px;
	background: rgba(245, 122, 117, 0.12);
	color: var(--tmo-coral);
}

.tmo-ct-card__label {
	font-size: 15px;
	font-weight: 500;
	color: var(--cp-muted);
}

.tmo-ct-card__value {
	font-size: clamp(21px, 1.6vw, 26px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--tmo-blue-dark);
	text-decoration: none;
	word-break: break-word;
}

a.tmo-ct-card__value:hover,
a.tmo-ct-card__value:focus-visible {
	color: var(--tmo-coral);
}

.tmo-ct-card__note {
	margin-top: 4px;
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--cp-muted);
}

/* Довідник і графік */

.tmo-ct-info {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 20px;
	margin-top: 20px;
}

.tmo-ct-info__block {
	padding: 30px;
	border-radius: var(--cp-radius);
	background: var(--cp-tint);
}

.tmo-ct-info__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--tmo-blue-dark);
}

.tmo-ct-info__title .tmo-icon {
	color: var(--tmo-blue);
}

.tmo-ct-phones {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ct-phones__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tmo-ct-phones__number {
	font-size: 18px;
	font-weight: 700;
	color: var(--tmo-blue-dark);
	text-decoration: none;
	white-space: nowrap;
}

.tmo-ct-phones__number:hover,
.tmo-ct-phones__number:focus-visible {
	color: var(--tmo-coral);
}

.tmo-ct-phones__label {
	font-size: 14.5px;
	line-height: 1.4;
	color: var(--cp-muted);
}

.tmo-ct-schedule {
	display: grid;
	gap: 12px;
	margin: 0;
}

.tmo-ct-schedule__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(58, 81, 110, 0.12);
}

.tmo-ct-schedule dt {
	font-size: 15.5px;
	font-weight: 500;
	color: var(--tmo-blue-dark);
}

.tmo-ct-schedule dd {
	margin: 0;
	font-size: 15.5px;
	text-align: right;
	color: #3b4552;
}

.tmo-ct-info__note {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--cp-muted);
}

/* --------------------------------------------------- Звернення громадян */

.tmo-ct-appeal {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	border-radius: 28px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 18px 44px rgba(30, 53, 86, 0.06);
}

.tmo-ct-appeal__main {
	padding: 52px 56px;
}

.tmo-ct-appeal__icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-bottom: 22px;
	border-radius: 16px;
	background: rgba(245, 122, 117, 0.12);
	color: var(--tmo-coral);
}

.tmo-ct-appeal__icon .tmo-icon {
	width: 28px;
	height: 28px;
}

.tmo-ct-appeal__title {
	margin: 0;
	font-size: clamp(28px, 2.3vw, 40px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--tmo-blue-dark);
}

.tmo-ct-appeal__text {
	margin: 16px 0 0;
	max-width: 620px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--cp-muted);
}

.tmo-ct-appeal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.tmo-ct-appeal__more {
	margin-top: 22px;
}

.tmo-ct-appeal__aside {
	padding: 44px 48px;
	background: var(--cp-tint);
}

.tmo-ct-appeal__subtitle {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
	color: var(--tmo-blue-dark);
}

.tmo-ct-appeal__subtitle:not(:first-child) {
	margin-top: 28px;
}

.tmo-ct-checks {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ct-checks li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15.5px;
	line-height: 1.45;
	color: #3b4552;
}

.tmo-ct-checks .tmo-icon {
	width: 20px;
	height: 20px;
	margin-top: 1px;
	color: var(--tmo-blue);
}

.tmo-ct-terms {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 22px 0 0;
}

.tmo-ct-terms > div {
	padding: 16px 18px;
	border-radius: var(--cp-radius-sm);
	background: #fff;
}

.tmo-ct-terms dt {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--tmo-coral);
}

.tmo-ct-terms dd {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--cp-muted);
}

.tmo-ct-appeal__note {
	margin: 12px 0 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--cp-muted);
}

.tmo-ct-lines {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ct-lines li {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.tmo-ct-lines a {
	font-size: 20px;
	font-weight: 700;
	color: var(--tmo-blue-dark);
	text-decoration: none;
}

.tmo-ct-lines a:hover,
.tmo-ct-lines a:focus-visible {
	color: var(--tmo-coral);
}

.tmo-ct-lines span {
	font-size: 14.5px;
	color: var(--cp-muted);
}

/* ------------------------------------------------- Центри: список і карта */

.tmo-ct-map {
	display: grid;
	grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.4fr);
	gap: 28px;
	align-items: start;
}

.tmo-ct-map--no-points {
	grid-template-columns: minmax(0, 1fr);
}

.tmo-ct-map__list {
	display: grid;
	gap: 10px;
}

.tmo-ct-place {
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-radius-sm);
	background: var(--tmo-page, #f8f8f8);
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tmo-ct-place:hover {
	border-color: rgba(115, 156, 210, 0.6);
}

.tmo-ct-place.is-active {
	border-color: var(--tmo-blue);
	background: #fff;
	box-shadow: var(--cp-shadow);
}

/* Центри під маркером, на який натиснули на карті. */
.tmo-ct-place.is-on-map {
	border-color: var(--tmo-coral);
}

.tmo-ct-place__heading {
	margin: 0;
	font: inherit;
}

.tmo-ct-place__head {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 16px 18px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.tmo-ct-place__head:focus-visible {
	outline: 2px solid var(--tmo-blue);
	outline-offset: -2px;
	border-radius: var(--cp-radius-sm);
}

.tmo-ct-place__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(115, 156, 210, 0.14);
	color: var(--tmo-blue-dark);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tmo-ct-place.is-active .tmo-ct-place__icon {
	background: var(--tmo-blue);
	color: #fff;
}

.tmo-ct-place__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	min-width: 0;
}

.tmo-ct-place__name {
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tmo-blue-dark);
}

.tmo-ct-place__address {
	font-size: 14.5px;
	line-height: 1.35;
	color: var(--cp-muted);
}

.tmo-ct-place__chevron {
	flex: none;
	color: var(--tmo-blue);
	transform: rotate(90deg);
	transition: transform 0.2s ease;
}

.tmo-ct-place__chevron .tmo-icon {
	width: 20px;
	height: 20px;
}

.tmo-ct-place__head[aria-expanded="true"] .tmo-ct-place__chevron {
	transform: rotate(-90deg);
}

.tmo-ct-place__body {
	display: grid;
	gap: 14px;
	padding: 2px 18px 18px 76px;
}

/* Скрипт увімкнувся — розгорнута лише обрана картка. */
.tmo-ct-map.is-ready .tmo-ct-place:not(.is-active) .tmo-ct-place__body {
	display: none;
}

.tmo-ct-place__note {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--cp-muted);
}

.tmo-ct-place__phones {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ct-place__phones li {
	display: flex;
	flex-direction: column;
}

.tmo-ct-place__phones a {
	font-size: 16px;
	font-weight: 700;
	color: var(--tmo-blue-dark);
	text-decoration: none;
}

.tmo-ct-place__phones a:hover,
.tmo-ct-place__phones a:focus-visible {
	color: var(--tmo-coral);
}

.tmo-ct-place__phones span {
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--cp-muted);
}

.tmo-ct-place__schedule {
	display: grid;
	gap: 6px;
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid var(--cp-line);
}

.tmo-ct-place__schedule > div {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2px 12px;
	font-size: 14px;
	line-height: 1.4;
}

.tmo-ct-place__schedule dt {
	color: var(--cp-muted);
}

.tmo-ct-place__schedule dd {
	margin: 0;
	font-weight: 500;
	color: var(--tmo-blue-dark);
}

.tmo-ct-place__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
}

.tmo-ct-place__route {
	color: var(--tmo-blue-muted);
}

.tmo-ct-place__route:hover .tmo-icon {
	transform: none;
}

/* Карта: без JavaScript схована, на широкому екрані прилипає під час прокрутки. */
.tmo-ct-map__side {
	display: none;
	position: sticky;
	top: 24px;
}

.admin-bar .tmo-ct-map__side {
	top: calc(24px + var(--wp-admin--admin-bar--height, 32px));
}

.tmo-ct-map.is-ready .tmo-ct-map__side {
	display: block;
}

.tmo-ct-map__canvas {
	height: min(640px, calc(100vh - 48px));
	min-height: 420px;
	border-radius: var(--cp-radius);
	background: var(--cp-tint);
	overflow: hidden;
	isolation: isolate;
}

/* Плитки OSM — трохи приглушені, щоб маркери й інтерфейс читались краще. */
.tmo-ct-map__canvas .leaflet-tile-pane {
	filter: saturate(0.55) contrast(1.02);
}

.tmo-ct-map__canvas.leaflet-container {
	font-family: var(--tmo-font);
}

.tmo-ct-map__canvas .leaflet-control-zoom a {
	color: var(--tmo-blue-dark);
}

/* Маркер */

.tmo-ct-pin {
	background: none;
	border: 0;
}

.tmo-ct-pin__body {
	position: relative;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 3px solid #fff;
	border-radius: 50% 50% 50% 0;
	background: var(--tmo-coral);
	box-shadow: 0 6px 16px rgba(30, 53, 86, 0.3);
	transform: rotate(-45deg);
}

.tmo-ct-pin__body::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
}

.tmo-ct-pin__body b {
	position: absolute;
	top: -10px;
	right: -10px;
	display: grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--tmo-blue-dark);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	transform: rotate(45deg);
}

/* Підказка маркера */

.tmo-ct-leaflet-popup .leaflet-popup-content-wrapper {
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(30, 53, 86, 0.18);
}

.tmo-ct-leaflet-popup .leaflet-popup-content {
	margin: 14px 18px;
	font-family: var(--tmo-font);
}

.tmo-ct-popup__address {
	margin: 0 0 8px !important;
	font-size: 13px;
	color: var(--cp-muted);
}

.tmo-ct-popup__list {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ct-popup__list a {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tmo-blue-dark);
	text-decoration: none;
}

.tmo-ct-popup__list a:hover {
	color: var(--tmo-coral);
}

.tmo-ct-popup__list .is-active a {
	color: var(--tmo-coral);
}

.tmo-ct-popup__list .is-active a::before {
	content: "● ";
	font-size: 10px;
	vertical-align: 2px;
}

/* ------------------------------------------------------------ Банер */

.tmo-ct-section--emergency .tmo-cp-btn .tmo-icon {
	transform: none;
}

/* ---------------------------------------------------------- Адаптація */

@media (max-width: 1200px) {
	.tmo-ct-info,
	.tmo-ct-appeal {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Вузько: карта над списком і прилипає зверху, щоб точку було видно під час вибору. */
@media (max-width: 900px) {
	.tmo-ct-map {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.tmo-ct-map__side {
		order: -1;
		top: 0;
		z-index: 5;
		padding-block: 8px;
		background: #fff;
	}

	.tmo-ct-map__canvas {
		height: 280px;
		min-height: 0;
	}
}

@media (max-width: 640px) {
	.tmo-ct-phones,
	.tmo-ct-terms {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ct-info__block {
		padding: 22px 18px;
	}

	.tmo-ct-appeal__main,
	.tmo-ct-appeal__aside {
		padding: 30px 20px;
	}

	.tmo-ct-place__body {
		padding-left: 18px;
	}

	.tmo-ct-map__canvas {
		height: 240px;
	}
}

.tmo-ct-popup__more {
	margin: 8px 0 0 !important;
	font-size: 12.5px;
	color: var(--cp-muted);
}

/* Вузько: картки контактів горизонтальні — іконка ліворуч, текст праворуч. */
@media (max-width: 640px) {
	.tmo-ct-cards {
		gap: 10px;
	}

	.tmo-ct-card {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		column-gap: 14px;
		row-gap: 2px;
		align-items: start;
		padding: 16px 18px;
	}

	.tmo-ct-card__icon {
		grid-row: span 3;
		width: 44px;
		height: 44px;
		margin: 0;
	}

	.tmo-ct-card__value {
		font-size: 20px;
	}

	.tmo-ct-card__note {
		margin-top: 2px;
		font-size: 13.5px;
	}
}
