/* NES — баннер cookie (152-ФЗ). Образец — баннер dancecolor.ru, цвета сайта NES. */

.nes-cc[hidden], .nes-cc [hidden] { display: none !important; }

.nes-cc {
	position: fixed;
	right: 34px;
	bottom: 34px;
	z-index: 100000;
	width: 600px;
	max-width: calc(100vw - 24px);
	font-family: 'Roboto', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: #0C0C0C;
	text-align: left;
}

.nes-cc__box {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 0 15px rgba(0, 0, 0, .15);
	padding: 18px 24px 20px;
	max-height: calc(100vh - 68px);
	overflow-y: auto;
}

.nes-cc__title {
	font-size: 16px;
	font-weight: 500;
	margin: 0 0 6px;
	color: #0C0C0C;
}

.nes-cc__text {
	margin: 0 0 16px;
	color: #3a3a3a;
}

.nes-cc a {
	color: #E63838;
	text-decoration: underline;
}
.nes-cc a:hover { color: #b82424; }

.nes-cc__btns {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.nes-cc__btn {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	border-radius: 8px;
	padding: 12px 22px;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
}
.nes-cc__btn--primary { background: #E63838; color: #fff; border: 1px solid #E63838; min-width: 150px; }
.nes-cc__btn--primary:hover { background: #c92c2c; border-color: #c92c2c; }
.nes-cc__btn--outline { background: #fff; color: #0C0C0C; border: 1px solid #0C0C0C; }
.nes-cc__btn--outline:hover { background: #0C0C0C; color: #fff; }
.nes-cc__btn--link { background: none; border: 0; color: #0C0C0C; padding: 12px 6px; margin-left: auto; text-decoration: underline; }
.nes-cc__btn--link:hover { color: #E63838; }
.nes-cc__btn:focus-visible { outline: 2px solid #E63838; outline-offset: 2px; }

/* Панель «Настроить» */
.nes-cc__rows { margin: 0 0 16px; border-top: 1px solid #e6e6e6; }
.nes-cc__row { border-bottom: 1px solid #e6e6e6; }
.nes-cc__row summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 0;
	cursor: pointer;
	list-style: none;
}
.nes-cc__row summary::-webkit-details-marker { display: none; }
.nes-cc__row summary::before {
	content: '+';
	width: 14px;
	font-size: 18px;
	line-height: 1;
	color: #0C0C0C;
	flex-shrink: 0;
}
.nes-cc__row[open] summary::before { content: '−'; }
.nes-cc__row-name { flex: 1; font-weight: 500; }
.nes-cc__row-state { font-size: 12px; color: #797979; white-space: nowrap; }
.nes-cc__row-state--always { color: #E63838; }
.nes-cc__row p { margin: 0 0 12px 24px; color: #3a3a3a; font-size: 13px; }

/* Переключатель */
.nes-cc__switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; margin: 0; cursor: pointer; }
.nes-cc__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.nes-cc__switch i { position: absolute; inset: 0; border-radius: 22px; background: #c9c9c9; transition: background-color .2s; }
.nes-cc__switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.nes-cc__switch input:checked + i { background: #E63838; }
.nes-cc__switch input:checked + i::after { transform: translateX(18px); }
.nes-cc__switch input:disabled { cursor: not-allowed; }
.nes-cc__switch input:disabled + i { opacity: .55; }
.nes-cc__switch input:focus-visible + i { outline: 2px solid #E63838; outline-offset: 2px; }

@media (max-width: 640px) {
	.nes-cc { right: 12px; left: 12px; bottom: 12px; width: auto; max-width: none; }
	.nes-cc__box { padding: 16px; border-radius: 16px; max-height: calc(100vh - 24px); }
	.nes-cc__btns .nes-cc__btn--primary, .nes-cc__btns .nes-cc__btn--outline { flex: 1 1 40%; min-width: 0; }
	.nes-cc__btn--link { margin-left: 0; width: 100%; text-align: center; }
}
