/*! AS Cookie Consent 1.0.1 — A. Saghyan. Размеры в px: окно не зависит от масштабирования rem в теме. */
html.ascc-lock,
html.ascc-lock body {
	overflow: hidden !important;
}

.ascc,
.ascc-fab {
	--ascc-accent: #2563eb;
	--ascc-text: #18181b;
	--ascc-muted: #52525b;
	--ascc-border: #e4e4e7;
	--ascc-surface: #ffffff;
	--ascc-soft: #f4f4f5;
}

.ascc[hidden],
.ascc [hidden] {
	display: none !important;
}

.ascc {
	position: fixed;
	inset: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	color: var(--ascc-text);
	-webkit-font-smoothing: antialiased;
}

.ascc *,
.ascc *::before,
.ascc *::after {
	box-sizing: border-box;
}

.ascc__backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(9, 9, 11, 0.62);
	animation: ascc-fade 0.16s ease-out;
}

.ascc__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	margin: 0;
	background: var(--ascc-surface);
	color: var(--ascc-text);
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.12);
	overflow: hidden;
	outline: none;
	animation: ascc-rise 0.18s ease-out;
}

.ascc__screen {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.ascc__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 28px 28px 12px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.ascc .ascc__title {
	margin: 0 0 12px;
	padding: 0 32px 0 0;
	font-family: inherit;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	color: var(--ascc-text);
	background: none;
	border: 0;
}

.ascc .ascc__text {
	margin: 0 0 12px;
	padding: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ascc-muted);
}

.ascc .ascc__link {
	color: var(--ascc-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ascc .ascc__link:hover,
.ascc .ascc__link:focus {
	text-decoration-thickness: 2px;
}

.ascc__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	flex: 0 0 auto;
	padding: 16px 28px 24px;
	border-top: 1px solid var(--ascc-border);
	background: var(--ascc-surface);
}

.ascc__actions--main .ascc__btn--outline {
	grid-column: 1 / -1;
}

.ascc .ascc__btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 18px;
	border: 2px solid var(--ascc-accent);
	border-radius: 999px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	box-shadow: none;
	cursor: pointer;
	transition: filter 0.15s ease, background-color 0.15s ease;
}

.ascc .ascc__btn--primary {
	background: var(--ascc-accent);
	color: #ffffff;
}

.ascc .ascc__btn--primary:hover {
	filter: brightness(0.92);
}

.ascc .ascc__btn--outline {
	background: transparent;
	color: var(--ascc-text);
	border-color: var(--ascc-border);
}

.ascc .ascc__btn--outline:hover {
	background: var(--ascc-soft);
}

.ascc .ascc__btn:focus-visible,
.ascc .ascc__back:focus-visible,
.ascc .ascc__close:focus-visible,
.ascc .ascc__switch:focus-visible,
.ascc .ascc__link:focus-visible {
	outline: 3px solid var(--ascc-accent);
	outline-offset: 2px;
}

.ascc__head {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 16px 20px 0;
}

.ascc .ascc__back {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 12px;
	border: 0;
	border-radius: 999px;
	background: var(--ascc-soft);
	color: var(--ascc-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
}

.ascc .ascc__back:hover {
	background: var(--ascc-border);
}

.ascc .ascc__close {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ascc-soft);
	color: var(--ascc-text);
	font-family: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ascc__cat {
	margin: 0 0 12px;
	padding: 16px;
	border: 1px solid var(--ascc-border);
	border-radius: 14px;
	background: var(--ascc-surface);
}

.ascc__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ascc .ascc__cat-title {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ascc-text);
	cursor: default;
}

.ascc label.ascc__cat-title {
	cursor: pointer;
}

.ascc__cat-ctrl {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.ascc .ascc__badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ascc-soft);
	color: var(--ascc-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.ascc .ascc__cat-desc {
	margin: 8px 0 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ascc-muted);
}

/* Переключатель: защищён от глобальных стилей чекбоксов темы. */
.ascc input.ascc__switch {
	-webkit-appearance: none !important;
	appearance: none !important;
	position: relative !important;
	display: inline-block !important;
	flex: 0 0 auto;
	width: 46px !important;
	height: 26px !important;
	min-width: 46px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #c4c4cc !important;
	opacity: 1 !important;
	visibility: visible !important;
	box-shadow: none !important;
	cursor: pointer;
	vertical-align: middle;
	transition: background-color 0.15s ease;
}

.ascc input.ascc__switch::before {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}

.ascc input.ascc__switch::after {
	content: none !important;
	display: none !important;
}

.ascc input.ascc__switch:checked {
	background: var(--ascc-accent) !important;
}

.ascc input.ascc__switch:checked::before {
	transform: translateX(20px);
}

.ascc input.ascc__switch:disabled {
	cursor: not-allowed;
	opacity: 0.55 !important;
}

.ascc-fab {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482000;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--ascc-border);
	border-radius: 999px;
	background: var(--ascc-surface);
	color: var(--ascc-text);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
}

@media (max-width: 520px) {
	.ascc {
		align-items: flex-end;
		padding: 8px;
	}

	.ascc__dialog {
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
		border-radius: 18px;
	}

	.ascc__body {
		padding: 22px 18px 8px;
	}

	.ascc .ascc__title {
		font-size: 19px;
	}

	.ascc .ascc__text {
		font-size: 14px;
	}

	.ascc__actions {
		grid-template-columns: 1fr;
		gap: 8px;
		padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.ascc__head {
		padding: 12px 14px 0;
	}

	.ascc__cat {
		padding: 14px;
	}

	.ascc__cat-head {
		flex-wrap: wrap;
	}
}

@keyframes ascc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes ascc-rise {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ascc__backdrop,
	.ascc__dialog {
		animation: none;
	}

	.ascc *,
	.ascc input.ascc__switch,
	.ascc input.ascc__switch::before {
		transition: none !important;
	}
}
