/**
 * Баннер cookie и окно настроек (template-parts/cookie-banner.php).
 * Темная полоса #143024 у нижнего края, z-index ниже липкой панели
 * звонка (90): баннер не перекрывает ее кнопки. На мобильном баннер
 * встает над панелью «Позвонить / MAX» (высота панели 56px).
 */

.reb-cookie {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 80;
	padding: 18px 0;
	background: var(--reb-text);
	color: #DCEFE3;
	box-shadow: 0 -8px 30px rgba(11, 58, 38, 0.35);
}

.reb-cookie[hidden] {
	display: none;
}

.reb-cookie__inner {
	display: flex;
	align-items: center;
	gap: 24px;
}

.reb-cookie__body {
	flex: 1;
	min-width: 0;
}

.reb-cookie__title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 800;
	color: #fff;
}

.reb-cookie__text {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #CFEBDA;
}

.reb-cookie__text a {
	color: #7FD6A6;
	text-decoration: underline;
}

.reb-cookie__text a:hover {
	color: #fff;
}

.reb-cookie__actions {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
}

.reb-cookie__btn {
	padding: 13px 22px;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.reb-cookie__btn--accept {
	background: var(--reb-accent);
	border: 1px solid var(--reb-accent);
	color: #fff;
}

.reb-cookie__btn--accept:hover {
	background: var(--reb-accent-dark);
}

.reb-cookie__btn--settings {
	background: transparent;
	border: 1px solid #7FD6A6;
	color: #EAFBF1;
}

.reb-cookie__btn--settings:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

/* Окно настроек категорий. */
.reb-cookie-settings {
	position: fixed;
	inset: 0;
	z-index: 210;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.reb-cookie-settings[hidden] {
	display: none;
}

.reb-cookie-settings__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 48, 36, 0.72);
}

.reb-cookie-settings__dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 28px 26px 26px;
	background: #fff;
	color: var(--reb-text);
}

.reb-cookie-settings__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	font-size: 15px;
	background: transparent;
	border: 0;
	color: var(--reb-text-faint);
	cursor: pointer;
}

.reb-cookie-settings__close:hover {
	color: var(--reb-text);
}

.reb-cookie-settings__title {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
}

.reb-cookie-settings__note {
	margin: 8px 0 18px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--reb-text-muted);
}

.reb-cookie-settings__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.reb-cookie-cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	border: 1px solid var(--reb-border);
	cursor: pointer;
}

.reb-cookie-cat--locked {
	background: var(--reb-bg);
	cursor: default;
}

.reb-cookie-cat__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.reb-cookie-cat__label {
	font-size: 14px;
	font-weight: 800;
}

.reb-cookie-cat__tag {
	margin-left: 6px;
	font-family: var(--reb-font-mono);
	font-size: 10px;
	font-style: normal;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--reb-text-faint);
}

.reb-cookie-cat__text {
	font-size: 12px;
	line-height: 1.45;
	color: var(--reb-text-muted);
}

.reb-cookie-cat__switch {
	flex: 0 0 auto;
}

.reb-cookie-cat__switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.reb-cookie-cat__toggle {
	position: relative;
	display: block;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: #CDDCD3;
	transition: background 0.2s;
}

.reb-cookie-cat__toggle::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #fff;
	transition: left 0.2s;
}

.reb-cookie-cat__switch input:checked + .reb-cookie-cat__toggle {
	background: var(--reb-accent);
}

.reb-cookie-cat__switch input:checked + .reb-cookie-cat__toggle::after {
	left: 21px;
}

.reb-cookie-cat__switch input:disabled + .reb-cookie-cat__toggle {
	opacity: 0.7;
}

.reb-cookie-settings__save {
	width: 100%;
	padding: 15px;
}

/* Адаптив: баннер столбиком над липкой панелью звонка. */
@media (max-width: 768px) {
	.reb-cookie {
		bottom: 56px;
		padding: 14px 0;
	}

	.reb-cookie__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.reb-cookie__actions {
		flex-direction: column;
	}

	.reb-cookie__btn {
		width: 100%;
	}
}
