/* ==========================================================================
 * NRG Audit — Global styles
 * Стили, ранее находившиеся в Custom CSS родительской темы.
 * Перенесены в дочернюю тему для централизованного контроля.
 * ========================================================================== */

.calculator-settings.ccb-front {
	margin: 0px !important;
}

.calc-container .calc-list .calc-subtotal-list .sub-list-item span {
	text-transform: none !important;
}

body {
	overflow-x: hidden;
}


/* ==========================================================================
 * TranslatePress — компактный переключатель языков (всегда раскрыт)
 * ========================================================================== */

/* Скрываем дропдаун-триггер */
.trp-language-switcher .trp-ls-shortcode-current-language {
	display: none !important;
}

/* Контейнер — компактный, как при ховере */
.trp-language-switcher .trp-ls-shortcode-language {
	display: flex !important;
	flex-direction: row !important;
	gap: 0 !important;
	background: #f0f0f0;
	border-radius: 8px;
	padding: 4px;
	width: fit-content !important;
	min-width: unset !important;
	max-width: unset !important;
	position: static !important;
	box-shadow: none !important;
	border: none !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	height: auto !important;
	overflow: visible !important;
	max-height: none !important;
	transform: none !important;
}

/* Кнопки */
.trp-language-switcher .trp-ls-shortcode-language a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-decoration: none !important;
	color: #555 !important;
	background: transparent;
	transition: all 0.25s ease;
	white-space: nowrap;
	line-height: 1;
	border: none !important;
	width: auto !important;
	min-width: unset !important;
}

.trp-language-switcher .trp-ls-shortcode-language a:hover {
	color: #222 !important;
	background: rgba(0, 0, 0, 0.05);
}

/* Активный язык */
.trp-language-switcher .trp-ls-shortcode-language a.trp-ls-shortcode-disabled-language {
	background: #fff !important;
	color: #111 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	cursor: default;
	pointer-events: none;
}

/* Блокируем ресайз при ховере */
.trp-language-switcher .trp-ls-shortcode-language,
.trp-language-switcher:hover .trp-ls-shortcode-language,
.trp-language-switcher:focus .trp-ls-shortcode-language,
.trp-language-switcher.trp-ls-shortcode-current-language:hover + .trp-ls-shortcode-language {
	width: fit-content !important;
	min-width: unset !important;
	max-width: unset !important;
}


/* ==========================================================================
 * NRG Article — стили таблиц внутри статей
 * ========================================================================== */

.nrg-article figure.wp-block-table {
	margin: 1.5em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Таблицы из одной колонки → стилизованные info-блоки */
.nrg-article figure.wp-block-table:has(tr > td:only-child) {
	overflow: visible;
}

.nrg-article figure.wp-block-table:has(tr > td:only-child) table {
	width: 100%;
	border-collapse: collapse;
	border: none;
	background: transparent;
}

.nrg-article figure.wp-block-table:has(tr > td:only-child) table tr {
	background: transparent !important;
}

.nrg-article figure.wp-block-table:has(tr > td:only-child) table td {
	display: block;
	border: none !important;
	border-radius: 6px;
	padding: 14px 18px 14px 20px;
	font-size: 0.9rem;
	line-height: 1.65;
	color: #1a3c5e;
	background: #eaf3fb;
	border-left: 4px solid #1a5276 !important;
	box-shadow: none;
}

.nrg-article figure.wp-block-table:has(tr > td:only-child) table td:is([data-warn]),
.nrg-article figure.wp-block-table:has(tr > td:only-child) table td.warn {
	background: #fdf0ef;
	border-left-color: #c0392b !important;
	color: #7b241c;
}


/* Многоколоночные таблицы */
.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	line-height: 1.5;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:first-child td {
	background: #1a5276;
	color: #fff;
	font-weight: 600;
	font-size: 0.82rem;
	letter-spacing: 0.02em;
	padding: 11px 14px;
	border: none;
	text-transform: none;
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:not(:first-child) td {
	padding: 10px 14px;
	border: none;
	border-bottom: 1px solid #e8edf2;
	color: #222;
	vertical-align: top;
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:not(:first-child):nth-child(even) td {
	background: #f4f8fb;
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:not(:first-child):nth-child(odd) td {
	background: #fff;
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:not(:first-child) td:first-child {
	font-weight: 400;
	color: #1a3c5e;
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:not(:first-child):hover td {
	background: #e6f0f8;
	transition: background 0.15s ease;
}

.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table tr:last-child td {
	border-bottom: none;
}

.nrg-article figure.wp-block-table table tr:first-child td strong {
	font-weight: inherit;
}

@media (max-width: 680px) {

	.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		border-radius: 8px;
	}

	.nrg-article figure.wp-block-table:not(:has(tr > td:only-child)) table {
		min-width: 480px;
		border-radius: 0;
		box-shadow: none;
	}

	.nrg-article figure.wp-block-table:has(tr > td:only-child) table td {
		padding: 12px 14px 12px 16px;
		font-size: 0.85rem;
	}
}
