/* ============================================================
   Баннер согласия на cookies статистики — inc/consent.php, assets/js/consent.js.
   Вариант U1 «слои-горы справа», утверждён Ойбеком 06.10.2026: карточка в правом нижнем углу,
   не модальная, ничего не блокирует. Плавное появление/скрытие (Ойбек 06.10): проявление + сдвиг 16px снизу;
   при «Уменьшении движения» (у Ойбека на iPhone включено) — только прозрачность, но работает.
   Баннер стоит вне .rd (первым в <body>), поэтому стили базы на него не действуют — свой префикс .rd-consent;
   кнопки сброшены явно: SCiO style.css и Astra красят любой <button>.
   Цвета вне токенов: фон карточки белый (до 06.10 — #F3FAF5), рамка #8CCBA6 — самый тёмный оттенок графика;
   оттенки графика #DCEFE3 / #C4E4CF / #A9D8BB / #8CCBA6 и линия #52B788 (= --rp-line) — в SVG разметки.
   ============================================================ */

.rd-consent[hidden] { display: none !important; }

.rd-consent {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1000; /* над нижней планкой «Фильтры» (900), под шапкой с меню (1100) и шторкой фильтров (100000) */
	box-sizing: border-box;
	width: 440px;
	max-width: calc(100vw - 48px);
	margin: 0;
	padding: 24px 24px 20px;
	overflow: hidden;
	background: #fff; /* белая и с сильной тенью — отделяется от светлых секций (вариант тени A, Ойбек 06.10) */
	border: 1px solid #8CCBA6;
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba(15, 23, 42, .55), 0 10px 24px rgba(15, 23, 42, .35);
	font-family: var(--rp-font-body, Inter, sans-serif);
	font-size: 15px;
	line-height: 1.5;
	color: var(--rp-text, #2F3B40);
	text-align: left;
}

/* Плавность: состояние «показан» — класс .is-in (assets/js/consent.js) */
.rd-consent {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .26s ease-in, transform .26s ease-in;
}
.rd-consent.is-in {
	opacity: 1;
	transform: none;
	transition: opacity .32s ease-out, transform .32s cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
	.rd-consent,
	.rd-consent.is-in { transform: none; transition: opacity .26s linear; }
}

/* фон-график растворяется к тексту */
.rd-consent__art {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 62%);
	mask-image: linear-gradient(90deg, transparent 38%, #000 62%);
}

.rd-consent__body { position: relative; z-index: 1; }

.rd-consent .rd-consent__title {
	margin: 0 0 6px;
	padding: 0;
	font-family: var(--rp-font-head, Outfit, Inter, sans-serif);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	color: var(--rp-ink, #0F172A);
}

.rd-consent .rd-consent__text {
	max-width: 225px;
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--rp-text, #2F3B40);
}

.rd-consent .rd-consent__short { display: none; }
.rd-consent .rd-consent__text a { color: var(--rp-btn, #367D5D); text-decoration: underline; text-underline-offset: 2px; }
.rd-consent .rd-consent__text a:hover { color: var(--r-green-dark, #1B4332); }

/* две кнопки одного размера — требование к согласию: колонки 1fr 1fr в сетке по содержимому */
.rd-consent__actions {
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 18px;
}

.rd-consent .rd-consent__btn {
	box-sizing: border-box;
	min-width: 124px;
	min-height: 0;
	margin: 0;
	padding: 12px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	box-shadow: none;
	font-family: var(--rp-font-body, Inter, sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: none;
}

.rd-consent .rd-consent__btn--no,
.rd-consent .rd-consent__btn--no:hover,
.rd-consent .rd-consent__btn--no:focus {
	background: #fff;
	border-color: var(--rp-border, #E5E9EC);
	color: var(--rp-ink, #0F172A);
}
.rd-consent .rd-consent__btn--no:hover { border-color: var(--rp-btn, #367D5D); }

.rd-consent .rd-consent__btn--yes,
.rd-consent .rd-consent__btn--yes:focus {
	background: var(--rp-btn, #367D5D);
	border-color: var(--rp-btn, #367D5D);
	color: var(--rp-btn-ink, #fff);
}
.rd-consent .rd-consent__btn--yes:hover {
	background: var(--r-green-dark, #1B4332);
	border-color: var(--r-green-dark, #1B4332);
	color: #fff;
}

/* фокус с клавиатуры — зелёный, как на всём сайте (resiland.css / portal.css задают его с !important для body.resiland-data);
   у самой карточки рамки нет: фокус на неё ставится только при открытии из подвала, как у модалок темы */
.rd-consent :focus-visible { outline: 2px solid var(--r-green-mid, #2D6A4F); outline-offset: 2px; }
.rd-consent:focus,
.rd-consent:focus-visible,
.rd-skin-portal.resiland-data .rd-consent:focus-visible { outline: none !important; }

/* Телефон: на всю ширину с полями 12px, график ниже и прозрачнее — абзац идёт во всю ширину поверх него */
@media (max-width: 720px) {
	/* Телефон — вариант M3a (Ойбек, 06.10): короткая фраза, график справа сверху до кнопок, карточка ниже */
	.rd-consent {
		left: 12px;
		right: 12px;
		bottom: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: none;
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
		overflow-y: auto;
		padding: 14px 14px 12px;
	}
	.rd-consent__art {
		inset: 0 0 auto auto;
		width: 58%;
		height: 100px;
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
		mask-image: linear-gradient(90deg, transparent, #000 40%);
	}
	.rd-consent .rd-consent__title { margin: 0 0 2px; font-size: 17px; white-space: normal; overflow-wrap: break-word; }
	.rd-consent .rd-consent__text { max-width: 58%; font-size: 13px; }
	.rd-consent .rd-consent__long { display: none; }
	.rd-consent .rd-consent__short { display: inline; }
	.rd-consent__actions { display: grid; width: 100%; margin-top: 10px; }
	.rd-consent .rd-consent__btn { min-width: 0; padding: 10px 12px; white-space: normal; }
}

/* Подвал: «Политика конфиденциальности» · «Настройки cookies» (хук resiland_footer_legal) — справа под строкой
   «Фотографии: …» (с 15.10; была третьей строкой под «©»), на телефоне — слева, как и строка фото.
   Кнопка выглядит как соседние ссылки подвала (portal.css: .rd-footer a — белый 85 %, наведение --rp-btn с подчёркиванием) */
.rd-footer__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; max-width: 100%; }
.rd-footer__legal { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; }
@media (max-width: 720px) {
	.rd-footer__end { align-items: flex-start; margin-left: 0; }
	.rd-footer__legal { justify-content: flex-start; }
}
.rd-footer .rd-footer__linkbtn,
.rd-footer .rd-footer__linkbtn:focus {
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	text-decoration: none;
	color: rgba(255, 255, 255, .85);
	cursor: pointer;
}
.rd-footer .rd-footer__linkbtn:hover { background: none; color: var(--rp-btn, #367D5D); text-decoration: underline; }
