/*
 * Прайслист платних послуг і перелік пакетів НСЗУ.
 * Сторінка «Платні послуги» бере заголовок, крихти й бічну колонку з blog.css.
 */

.tmo-prices,
.tmo-packages {
	--tmo-border: rgba(115, 156, 210, 0.18);
	--tmo-muted: rgba(44, 63, 87, 0.66);
	--tmo-surface: #f4f8fd;
	--tmo-radius: 18px;
}

/* ---------------------------------------------------------- Прайслист */

.tmo-prices {
	display: flex;
	flex-direction: column;
	gap: 24px;
	font-family: var(--tmo-font);
	color: var(--tmo-ink);
}

.tmo-prices__section {
	padding: 26px 28px 12px;
	border: 1px solid var(--tmo-border);
	border-radius: var(--tmo-radius);
	background: #fff;
	/* Щоб заголовок після переходу за якорем не ховався під верхнім краєм. */
	scroll-margin-top: 24px;
}

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

.tmo-prices__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.tmo-prices__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: #eef4fb;
	color: var(--tmo-blue-dark);
}

.tmo-prices__heading {
	flex: 1;
	margin: 0;
	font-size: clamp(21px, 1.6vw, 26px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--tmo-navy);
}

.tmo-prices__count {
	flex: none;
	min-width: 34px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #eef4fb;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	color: #2f5d97;
}

.tmo-prices__sub {
	margin-top: 22px;
}

.tmo-prices__head + .tmo-prices__sub,
.tmo-prices__head + .tmo-prices__description + .tmo-prices__sub {
	margin-top: 4px;
}

.tmo-prices__subheading {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: #2f5d97;
}

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

.tmo-prices__table {
	width: 100%;
	margin: 0 0 14px;
	border-collapse: collapse;
	font-size: 15.5px;
	line-height: 1.45;
}

.tmo-prices__table th,
.tmo-prices__table td {
	padding: 11px 12px;
	border: 0;
	border-bottom: 1px solid var(--tmo-border);
	text-align: left;
	vertical-align: top;
}

.tmo-prices__table thead th {
	padding-block: 8px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tmo-muted);
}

.tmo-prices__table tbody tr:last-child td {
	border-bottom: 0;
}

.tmo-prices__table tbody tr:hover {
	background: var(--tmo-surface);
}

.tmo-prices__table td.tmo-prices__price,
.tmo-prices__table thead th + th {
	width: 9.5rem;
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.tmo-prices__table td.tmo-prices__price {
	font-weight: 600;
	color: var(--tmo-navy);
}

/* ------------------------------------------------ Сторінка прайслиста */

.tmo-prices-page__empty {
	padding-bottom: 90px;
}

.tmo-prices-note {
	margin-bottom: 24px;
	border: 1px solid var(--blog-line);
	border-radius: var(--blog-radius);
	background: var(--blog-tint);
	color: var(--tmo-ink);
}

.tmo-prices-note summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	font-size: 16px;
	font-weight: 600;
	color: var(--tmo-navy);
	cursor: pointer;
	list-style: none;
}

.tmo-prices-note summary::-webkit-details-marker {
	display: none;
}

.tmo-prices-note summary span {
	flex: 1;
}

.tmo-prices-note summary .tmo-icon {
	color: var(--tmo-blue-dark);
}

.tmo-prices-note__chevron {
	transform: rotate(90deg);
	transition: transform 0.2s ease;
}

.tmo-prices-note[open] .tmo-prices-note__chevron {
	transform: rotate(-90deg);
}

.tmo-prices-note ul,
.tmo-prices-note p {
	margin: 0;
	padding: 0 20px 16px 56px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--blog-muted);
}

.tmo-prices-note li + li {
	margin-top: 6px;
}

.tmo-prices-search__field {
	position: relative;
}

.tmo-prices-search__field .tmo-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	width: 20px;
	height: 20px;
	color: var(--tmo-blue-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.tmo-prices-search input {
	width: 100%;
	height: 48px;
	padding: 0 14px 0 44px;
	border: 1px solid var(--blog-line);
	border-radius: 12px;
	background: var(--tmo-page, #f8f8f8);
	font: inherit;
	font-size: 15.5px;
	color: var(--tmo-ink);
}

.tmo-prices-search input:focus {
	border-color: var(--tmo-blue);
	outline: 2px solid rgba(115, 156, 210, 0.3);
	outline-offset: 0;
	background: #fff;
}

.tmo-prices-nav__total {
	margin-left: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--blog-muted);
}

/* Розділів багато — список прокручується всередині липкої колонки. */
.tmo-prices-nav .tmo-blog-filter__list {
	max-height: calc(100vh - 260px);
	overflow-y: auto;
	scrollbar-width: thin;
}

.tmo-prices-nav .tmo-blog-filter__link {
	font-size: 15px;
	line-height: 1.3;
}

/* Колонка на всю висоту сітки — інакше «липкому» блоку нікуди рухатися. */
@media (min-width: 1101px) {
	.tmo-prices-layout .tmo-blog-aside {
		align-self: stretch;
	}
}

@media (max-width: 1100px) {
	.tmo-prices-nav .tmo-blog-filter__list {
		max-height: none;
	}

	.tmo-prices-nav__total {
		display: none;
	}

	/* На вузьких екранах пошук «прилипає» вгорі — таблиці довгі. */
	.tmo-prices-layout .tmo-blog-aside {
		position: sticky;
		top: 0;
		z-index: 5;
		margin-inline: calc(var(--tmo-gutter) * -1);
		padding: 10px var(--tmo-gutter) 4px;
		background: var(--tmo-page, #f8f8f8);
		box-shadow: 0 10px 18px -16px rgba(30, 53, 86, 0.35);
	}

	.admin-bar .tmo-prices-layout .tmo-blog-aside {
		top: var(--wp-admin--admin-bar--height, 0);
	}

	.tmo-prices-layout .tmo-blog-aside__sticky {
		gap: 10px;
	}

	.tmo-prices-search {
		padding: 0;
		border: 0;
		background: transparent;
	}

	.tmo-prices-search .tmo-blog-box__title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.tmo-prices-search input {
		background: #fff;
	}

	.tmo-prices__section {
		scroll-margin-top: 150px;
	}
}

@media (max-width: 600px) {
	.tmo-prices__section {
		padding: 18px 14px 6px;
	}

	.tmo-prices__icon {
		width: 38px;
		height: 38px;
		border-radius: 12px;
	}

	.tmo-prices__table {
		font-size: 14.5px;
	}

	.tmo-prices__table th,
	.tmo-prices__table td {
		padding: 9px 6px;
	}

	.tmo-prices__table td.tmo-prices__price,
	.tmo-prices__table thead th + th {
		width: 6.5rem;
	}

	.tmo-prices-note ul,
	.tmo-prices-note p {
		padding-left: 20px;
	}
}

/* --- Пакети НСЗУ --- */

.tmo-packages {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-package {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	border: 1px solid var(--tmo-border);
	border-radius: var(--tmo-radius);
}

.tmo-package__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.3;
}

.tmo-package__excerpt {
	margin: 0;
	color: var(--tmo-muted);
	font-size: 0.9375em;
}

.tmo-package__button {
	align-self: flex-start;
	margin-top: auto;
	padding: 0.55rem 1rem;
	border: 1px solid currentColor;
	border-radius: var(--tmo-radius);
	text-decoration: none;
	font-size: 0.9375em;
	line-height: 1.2;
	white-space: nowrap;
}

.tmo-package__button:hover,
.tmo-package__button:focus-visible {
	background: var(--tmo-surface);
}

.tmo-packages__intro {
	max-width: 70ch;
	margin: 0 0 1.25rem;
	color: var(--tmo-muted);
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* Плитки пакетів: номер ліворуч, назва праворуч. */
.tmo-packages--tiles {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	margin-bottom: 50px;
}

.tmo-package--plain {
	flex-direction: row;
	align-items: stretch;
	gap: 0;
	min-height: 220px;
	padding: 0;
	background: #fff;
	overflow: hidden;
}

/* Фото врівень із краями плитки — обрізає сама плитка. */
.tmo-package__media {
	display: block;
	flex: none;
	width: 290px;
	align-self: stretch;
	background: var(--tmo-surface);
}

.tmo-package__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tmo-package__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 1rem 1.25rem;
}

.tmo-package__label {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--tmo-muted);
}

.tmo-package--plain .tmo-package__title {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--tmo-navy);
}

@media (max-width: 1100px) {
	.tmo-packages--tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.tmo-packages,
	.tmo-packages--tiles {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-package__media {
		width: 120px;
	}

	.tmo-package__body {
		padding: 0.875rem 1rem;
	}
}
