/*
Мост для шапки/футера, собранных блоками (synced patterns wp_block).
Действует на всех страницах внутри обёртки .ums-scope.
Повторяет значения ums-design.css для блочной разметки (div/p/a/figure вместо span/header/footer).
*/

.ums-scope figure {
	margin: 0;
}

.ums-scope .wp-block-buttons,
.ums-scope .wp-block-button {
	display: contents;
}

.ums-scope a.wp-block-button__link {
	text-decoration: none;
	color: inherit;
	box-shadow: none;
	width: auto;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}

.ums-scope .link-p {
	display: contents;
}

/* Абзацы, заменившие span/a/small в исходной разметке, не должны нести margin.
   footer-address оставляем как есть (в оригинале это тоже <p>). */
.ums-scope .topbar-note,
.ums-scope .brand-text,
.ums-scope .header-phone,
.ums-scope .footer-logo,
.ums-scope .footer-copy,
.ums-scope .footer-privacy,
.ums-scope .footer-slogan,
.ums-scope .card-overlay {
	margin: 0;
}

/* Дизайн красит все .ums-scope p в #66737c; в шапке/футере абзацы должны
   наследовать цвет контейнера (как наследовали span/a в исходной разметке).
   footer-address не трогаем — его цвет задаёт .footer-main p. */
.ums-scope .topbar-note,
.ums-scope .topbar-mail,
.ums-scope .brand-text,
.ums-scope .header-phone,
.ums-scope .footer-logo,
.ums-scope .footer-mail,
.ums-scope .footer-copy,
.ums-scope .footer-privacy,
.ums-scope .footer-slogan,
.ums-scope .mobile-actions p {
	color: inherit;
}

/* --- topbar --- */
.ums-scope .topbar .container > p.topbar-note {
	max-width: none;
}
.ums-scope .topbar a {
	align-items: center;
	gap: 8px;
	display: flex;
}
.ums-scope .topbar-mail a::after {
	content: "";
	width: 13px;
	height: 13px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- header / brand --- */
.ums-scope .brand {
	position: relative;
}
.ums-scope .brand .brand-logo img {
	object-fit: contain;
	flex-shrink: 0;
	width: 72px;
	height: 72px;
}
.ums-scope .brand .brand-text {
	font-size: 22px;
	font-weight: 700;
}
.ums-scope .brand .brand-text .brand-light {
	font-size: 22px;
	font-weight: 700;
}
.ums-scope .brand .card-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	margin: 0;
}
.ums-scope .brand .card-overlay a {
	position: absolute;
	inset: 0;
	display: block;
}
.ums-scope .header-phone {
	margin: 0;
}
.ums-scope .header-phone small::after {
	content: "";
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- footer --- */
.ums-scope .footer {
	color: #dce5ea;
	background: #142b3a;
	padding-block: 50px 20px;
}
.ums-scope .footer-main p.footer-logo {
	letter-spacing: -.04em;
	font-size: 19px;
	font-weight: 750;
	color: inherit;
}
.ums-scope .footer-phone {
	font-size: 19px;
	font-weight: 650;
}
.ums-scope .footer-phone a {
	font-size: inherit;
	line-height: 1.65;
}
.ums-scope .footer-main p.footer-mail {
	color: inherit;
	font-size: 14px;
}

/* --- mobile actions --- */
.ums-scope .mobile-actions .ma-call a {
	background: transparent;
	color: inherit;
}
.ums-scope .mobile-actions .ma-call a::before {
	content: "";
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ums-scope .mobile-actions .ma-request a::after {
	content: "";
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- home variants --- */
.ums-scope.home-page .footer {
	background: #171719;
}
.ums-scope.home-page .mobile-actions .ma-call a {
	background: transparent;
	color: inherit;
}
.ums-scope.home-page .mobile-actions .ma-request a {
	background: var(--home-accent);
	color: #171719;
}

@media (max-width: 900px) {
	.ums-scope .footer-phone {
		font-size: 15px;
	}
	.ums-scope .footer-main p.footer-logo {
		font-size: 16px;
	}
}

@media (max-width: 650px) {
	.ums-scope .topbar .container > p.topbar-note {
		max-width: 200px;
		font-size: 12px;
	}
	.ums-scope .brand .brand-logo img {
		width: 57px;
		height: 57px;
	}
	.ums-scope .brand .brand-text,
	.ums-scope .brand .brand-text .brand-light {
		font-size: 18px;
	}
	.ums-scope .footer {
		padding-bottom: 85px;
	}
	.ums-scope .footer-phone {
		font-size: 20px;
	}
	.ums-scope .footer-main p.footer-logo {
		font-size: 21px;
	}
	.ums-scope .footer-bottom > p:last-child {
		display: none;
	}
}