/* Dead Cat Radio — плеер внизу сайта (assets/player.js). Все стили внутри .dcr-bar: тема сайта
   красит кнопки и ссылки по-своему, поэтому здесь всё задано явно. */

.dcr-bar,
.dcr-bar.dcr-theme-light {
	--dcr-bg: #ffffff;
	--dcr-text: #1d1b19;
	--dcr-muted: #6f6a64;
	--dcr-line: #e3dfd8;
	--dcr-hover: #f6f3ef;
	--dcr-accent: #d2452f;
	--dcr-accent-text: #ffffff;
	--dcr-art-filter: none;
	--dcr-shadow: 0 -6px 24px rgba(0, 0, 0, .10);
	--dcr-pop-shadow: 0 12px 32px rgba(0, 0, 0, .16);
	--dcr-viz: rgba(210, 69, 47, .15);
}
.dcr-bar.dcr-theme-dark {
	--dcr-bg: #1e1c1b;
	--dcr-text: #ece8e3;
	--dcr-muted: #9b958e;
	--dcr-line: #2f2c2a;
	--dcr-hover: #2a2725;
	--dcr-accent: #ec6a52;
	--dcr-accent-text: #141312;
	--dcr-art-filter: none;
	--dcr-shadow: 0 -6px 24px rgba(0, 0, 0, .45);
	--dcr-pop-shadow: 0 12px 32px rgba(0, 0, 0, .55);
	--dcr-viz: rgba(236, 106, 82, .17);
}
.dcr-bar.dcr-theme-night {
	--dcr-bg: #0a0807;
	--dcr-text: #c99a6b;
	--dcr-muted: #7d6149;
	--dcr-line: #1e1712;
	--dcr-hover: #140f0b;
	--dcr-accent: #a8432c;
	--dcr-accent-text: #0a0807;
	--dcr-art-filter: brightness(.6) sepia(.35);
	--dcr-shadow: 0 -6px 24px rgba(0, 0, 0, .6);
	--dcr-pop-shadow: 0 12px 32px rgba(0, 0, 0, .7);
	--dcr-viz: rgba(168, 67, 44, .22);
}

html.dcr-bar-on body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

.dcr-bar[hidden] { display: none !important; }
.dcr-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: var(--dcr-bg);
	color: var(--dcr-text);
	border-top: 1px solid var(--dcr-line);
	box-shadow: var(--dcr-shadow);
	font-size: 15px;
	line-height: 1.35;
	text-align: left;
	transition: background-color .2s, color .2s;
}
.dcr-bar *, .dcr-bar *::before, .dcr-bar *::after { box-sizing: border-box; }
.dcr-bar a, .dcr-bar a:hover, .dcr-bar a:focus { color: inherit; text-decoration: none; box-shadow: none; border: 0; }
.dcr-bar svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.dcr-bar svg.dcr-stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dcr-bar [hidden] { display: none !important; }

/* Визуализация: спектр за содержимым панели. */
.dcr-bar-viz {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Полоса прогресса по верхнему краю панели; у трека по ней можно перематывать. */
.dcr-bar-seek {
	position: absolute;
	left: 0;
	right: 0;
	top: -2px;
	z-index: 2;
	height: 4px;
	background: var(--dcr-line);
}
.dcr-bar-seek[role="slider"] { cursor: pointer; touch-action: none; }
.dcr-bar-seek[role="slider"]::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; }
.dcr-bar-seek[role="slider"]:hover,
.dcr-bar-seek[role="slider"]:focus-visible { height: 6px; top: -3px; outline: none; }
.dcr-bar-fill {
	display: block;
	width: 0;
	height: 100%;
	background: var(--dcr-accent);
}
.dcr-bar-live .dcr-bar-fill { opacity: .55; }

.dcr-bar-row {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 68px;
	padding: 8px 16px;
}

.dcr-bar .dcr-bar-art {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	background: var(--dcr-line) center / cover no-repeat;
	filter: var(--dcr-art-filter);
}
.dcr-bar-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dcr-bar .dcr-bar-title,
.dcr-bar-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcr-bar .dcr-bar-title { font-weight: 600; }
.dcr-bar .dcr-bar-title[href]:hover { color: var(--dcr-accent); }
.dcr-bar-sub { font-size: 13px; color: var(--dcr-muted); }
.dcr-bar-live .dcr-bar-sub::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--dcr-accent);
	vertical-align: 1px;
}
.dcr-bar-error .dcr-bar-sub { color: var(--dcr-accent); }

.dcr-bar-ctrls { display: flex; align-items: center; gap: 4px; flex: none; }

.dcr-bar .dcr-bar-btn {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--dcr-text);
	font: inherit;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.dcr-bar .dcr-bar-btn:hover,
.dcr-bar .dcr-bar-btn:focus { background: var(--dcr-hover); color: var(--dcr-accent); outline: none; }
.dcr-bar .dcr-bar-btn:focus-visible { box-shadow: 0 0 0 2px var(--dcr-accent); }
.dcr-bar .dcr-bar-btn[disabled] { opacity: .35; cursor: default; background: transparent; color: var(--dcr-text); }

.dcr-bar .dcr-bar-play {
	width: 46px;
	height: 46px;
	background: var(--dcr-accent);
	color: var(--dcr-accent-text);
}
.dcr-bar .dcr-bar-play:hover,
.dcr-bar .dcr-bar-play:focus { background: var(--dcr-accent); color: var(--dcr-accent-text); filter: brightness(1.08); }
.dcr-bar .dcr-bar-play svg { width: 24px; height: 24px; }
.dcr-bar .dcr-bi-pause,
.dcr-bar-playing .dcr-bi-play { display: none; }
.dcr-bar-playing .dcr-bi-pause { display: block; }

/* Загрузка: вращающееся кольцо вокруг кнопки. */
.dcr-bar-spin {
	display: none;
	position: absolute;
	inset: -4px;
	border: 2px solid transparent;
	border-top-color: var(--dcr-accent);
	border-radius: 50%;
	animation: dcr-bar-spin .9s linear infinite;
}
.dcr-bar-loading .dcr-bar-spin { display: block; }
@keyframes dcr-bar-spin { to { transform: rotate(360deg); } }

/* После перезагрузки браузер не дал играть сам — кнопка «пульсирует», ждёт нажатия. */
.dcr-bar-blocked .dcr-bar-play { animation: dcr-bar-pulse 1.6s ease-in-out infinite; }
@keyframes dcr-bar-pulse { 50% { box-shadow: 0 0 0 7px rgba(210, 69, 47, .25); } }

.dcr-bar-time {
	flex: none;
	min-width: 86px;
	font-size: 13px;
	color: var(--dcr-muted);
	font-variant-numeric: tabular-nums;
	text-align: center;
}
.dcr-bar-live .dcr-bar-time { min-width: 0; }

/* Лайк: сердце, рядом — сколько лайков. */
.dcr-bar .dcr-bar-like { width: auto; min-width: 38px; padding: 0 9px; gap: 5px; border-radius: 19px; }
.dcr-bar .dcr-bar-like[aria-pressed="true"] { color: var(--dcr-accent); }
.dcr-bar .dcr-bar-like[aria-pressed="true"] svg { fill: currentColor; }
.dcr-bar-count { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dcr-bar-count:empty { display: none; }
.dcr-bar-pop svg { animation: dcr-bar-pop .4s ease-out; }
@keyframes dcr-bar-pop { 40% { transform: scale(1.35); } }

/* Подписи кнопок видны только в меню «⋯»; в строке — для экранных дикторов. */
.dcr-bar-label,
.dcr-bar-sr,
.dcr-nav-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.dcr-bar-switch { display: none; }

/* Редкие кнопки: эфир станций, страница песни, поделиться, очередь, визуализация, громкость, радио. */
.dcr-bar-extra { display: flex; align-items: center; gap: 2px; flex: none; }
.dcr-bar .dcr-bar-more { display: none; }

.dcr-bar-stations {
	display: flex;
	gap: 2px;
	margin-right: 6px;
	padding: 2px;
	border: 1px solid var(--dcr-line);
	border-radius: 999px;
}
.dcr-bar .dcr-bar-st {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 7px 11px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--dcr-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.dcr-bar .dcr-bar-st:hover,
.dcr-bar .dcr-bar-st:focus { background: var(--dcr-hover); color: var(--dcr-text); outline: none; }
.dcr-bar .dcr-bar-st:focus-visible { box-shadow: 0 0 0 2px var(--dcr-accent); }
.dcr-bar .dcr-bar-st[aria-pressed="true"] { background: var(--dcr-accent); color: var(--dcr-accent-text); }
.dcr-bar .dcr-bar-st[aria-pressed="true"]::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 6px;
	border-radius: 50%;
	background: currentColor;
	vertical-align: 1px;
}

.dcr-bar .dcr-bar-vizbtn[aria-pressed="true"] { color: var(--dcr-accent); }

/* Громкость: кнопка «без звука», ползунок раскрывается при наведении или с клавиатуры. */
.dcr-bar-vol { display: flex; align-items: center; }
.dcr-bar .dcr-bar-range {
	-webkit-appearance: auto;
	appearance: auto;
	width: 0;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	opacity: 0;
	accent-color: var(--dcr-accent);
	cursor: pointer;
	transition: width .2s, opacity .2s, margin .2s;
}
.dcr-bar-vol:hover .dcr-bar-range,
.dcr-bar-vol:focus-within .dcr-bar-range { width: 88px; margin: 0 6px 0 2px; opacity: 1; }
.dcr-bar .dcr-vol-x,
.dcr-bar-muted .dcr-vol-w1,
.dcr-bar-muted .dcr-vol-w2,
.dcr-bar-quiet .dcr-vol-w2 { display: none; }
.dcr-bar-muted .dcr-vol-x { display: inline; }

/* Очередь: список треков над панелью. */
.dcr-bar-queue {
	position: absolute;
	right: 12px;
	bottom: calc(100% + 10px);
	z-index: 3;
	display: flex;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 24px);
	max-height: min(60vh, 480px);
	overflow: hidden;
	background: var(--dcr-bg);
	color: var(--dcr-text);
	border: 1px solid var(--dcr-line);
	border-radius: 14px;
	box-shadow: var(--dcr-pop-shadow);
}
.dcr-bar-qhead { padding: 12px 16px 6px; font-weight: 700; }
.dcr-bar .dcr-bar-qlist {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 2px 6px 6px;
	overflow-y: auto;
	list-style: none;
}
.dcr-bar .dcr-bar-qlist li { margin: 0; padding: 0; list-style: none; }
.dcr-bar .dcr-bar-qitem {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}
.dcr-bar .dcr-bar-qitem:hover,
.dcr-bar .dcr-bar-qitem:focus { background: var(--dcr-hover); outline: none; }
.dcr-bar .dcr-bar-qitem:focus-visible { box-shadow: inset 0 0 0 2px var(--dcr-accent); }
.dcr-bar .dcr-bar-qitem[aria-current="true"] { color: var(--dcr-accent); }
.dcr-bar-qnum { flex: none; min-width: 22px; color: var(--dcr-muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.dcr-bar-qitem[aria-current="true"] .dcr-bar-qnum { color: inherit; }
.dcr-bar-qtext { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dcr-bar-qtitle,
.dcr-bar-qartist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcr-bar-qitem[aria-current="true"] .dcr-bar-qtitle { font-weight: 600; }
.dcr-bar-qartist { font-size: 13px; color: var(--dcr-muted); }
.dcr-bar-qtime { flex: none; font-size: 13px; color: var(--dcr-muted); font-variant-numeric: tabular-nums; }
.dcr-bar-qafter { padding: 9px 16px 12px; border-top: 1px solid var(--dcr-line); font-size: 13px; color: var(--dcr-muted); }

/* Сообщение над панелью: «Ссылка скопирована». */
.dcr-bar-toast {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 14px);
	z-index: 4;
	max-width: calc(100vw - 32px);
	padding: 9px 16px;
	border-radius: 10px;
	background: var(--dcr-text);
	color: var(--dcr-bg);
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 6px);
	transition: opacity .2s, transform .2s;
}
.dcr-bar-toast:empty { display: none; }
.dcr-bar-toast-on { opacity: 1; transform: translate(-50%, 0); }

/* Уже 1100 px: редкие кнопки — в меню «⋯» над панелью, с подписями. */
@media (max-width: 1099px) {
	.dcr-bar .dcr-bar-more { display: inline-flex; }
	.dcr-bar-extra {
		display: none;
		position: absolute;
		right: 12px;
		bottom: calc(100% + 10px);
		z-index: 3;
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		width: 270px;
		max-width: calc(100vw - 24px);
		padding: 8px;
		background: var(--dcr-bg);
		border: 1px solid var(--dcr-line);
		border-radius: 14px;
		box-shadow: var(--dcr-pop-shadow);
	}
	.dcr-bar-menu-open .dcr-bar-extra { display: flex; }
	.dcr-bar-menu-open .dcr-bar-more { background: var(--dcr-hover); color: var(--dcr-accent); }
	.dcr-bar-extra .dcr-bar-btn {
		width: 100%;
		height: 42px;
		padding: 0 10px;
		gap: 12px;
		justify-content: flex-start;
		border-radius: 10px;
		font-size: 15px;
		text-align: left;
	}
	.dcr-bar-extra .dcr-bar-label {
		position: static !important;
		width: auto;
		height: auto;
		overflow: hidden;
		clip: auto;
		text-overflow: ellipsis;
	}
	.dcr-bar-extra .dcr-bar-switch {
		display: block;
		position: relative;
		width: 34px;
		height: 20px;
		margin-left: auto;
		border-radius: 10px;
		background: var(--dcr-line);
		transition: background-color .15s;
	}
	.dcr-bar-extra .dcr-bar-switch::after {
		content: "";
		position: absolute;
		top: 3px;
		left: 3px;
		width: 14px;
		height: 14px;
		border-radius: 50%;
		background: var(--dcr-bg);
		transition: transform .15s;
	}
	.dcr-bar .dcr-bar-vizbtn[aria-pressed="true"] .dcr-bar-switch { background: var(--dcr-accent); }
	.dcr-bar .dcr-bar-vizbtn[aria-pressed="true"] .dcr-bar-switch::after { transform: translateX(14px); }
	.dcr-bar .dcr-bar-vizbtn[aria-pressed="true"] { color: var(--dcr-text); }
	.dcr-bar-extra .dcr-bar-stations {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
		margin: 0 0 6px;
		padding: 0 0 8px;
		border: 0;
		border-bottom: 1px solid var(--dcr-line);
		border-radius: 0;
	}
	.dcr-bar-extra .dcr-bar-stations::before {
		content: "Эфир";
		grid-column: 1 / -1;
		padding: 2px 4px 0;
		font-size: 12px;
		color: var(--dcr-muted);
	}
	.dcr-bar-extra .dcr-bar-st { padding: 10px 6px; border: 1px solid var(--dcr-line); border-radius: 10px; text-align: center; }
	.dcr-bar-extra .dcr-bar-st[aria-pressed="true"] { border-color: var(--dcr-accent); }
	.dcr-bar-extra .dcr-bar-vol { gap: 4px; }
	.dcr-bar-extra .dcr-bar-vol .dcr-bar-btn { width: 42px; padding: 0; justify-content: center; }
	.dcr-bar-extra .dcr-bar-vol .dcr-bar-label { position: absolute !important; width: 1px; height: 1px; clip: rect(0 0 0 0); }
	.dcr-bar-extra .dcr-bar-range,
	.dcr-bar-vol:hover .dcr-bar-range,
	.dcr-bar-vol:focus-within .dcr-bar-range { flex: 1; width: auto; margin: 0 10px 0 4px; opacity: 1; }
	.dcr-bar-novol .dcr-bar-extra .dcr-bar-vol .dcr-bar-btn { width: 100%; padding: 0 10px; justify-content: flex-start; }
	.dcr-bar-novol .dcr-bar-extra .dcr-bar-vol .dcr-bar-label { position: static !important; width: auto; height: auto; clip: auto; }
}

@media (max-width: 640px) {
	html.dcr-bar-on body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
	.dcr-bar-row { gap: 6px; min-height: 60px; padding: 6px 8px 6px 10px; }
	.dcr-bar .dcr-bar-art { width: 42px; height: 42px; }
	.dcr-bar-time, .dcr-bar .dcr-bar-prev { display: none; }
	.dcr-bar-row > .dcr-bar-btn, .dcr-bar-ctrls .dcr-bar-btn { width: 34px; height: 34px; }
	.dcr-bar .dcr-bar-like { width: auto; min-width: 34px; padding: 0 6px; }
	.dcr-bar .dcr-bar-play { width: 42px; height: 42px; }
	.dcr-bar-extra .dcr-bar-btn { height: 44px; }
	.dcr-bar-extra .dcr-bar-vol .dcr-bar-btn { width: 44px; }
	.dcr-bar-queue, .dcr-bar-extra { right: 8px; left: 8px; width: auto; max-width: none; }
	.dcr-bar { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.dcr-bar-spin, .dcr-bar-blocked .dcr-bar-play, .dcr-bar-pop svg { animation: none; }
}

/* Переход по сайту без перезагрузки (nav.js): тонкая полоса вверху, пока грузится страница. */
html.dcr-nav-loading::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99991;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, transparent, #d2452f 40%, transparent);
	background-size: 50% 100%;
	background-repeat: no-repeat;
	animation: dcr-nav 1s ease-in-out infinite;
}
@keyframes dcr-nav { from { background-position: -50% 0; } to { background-position: 150% 0; } }
html.dcr-nav-loading, html.dcr-nav-loading * { cursor: progress; }
[data-dcr-focus]:focus { outline: none; }
