.radio-player-shell {
    position: relative;
    width: 100%;	
    margin: 0 auto;
    border-radius: 0px;
    overflow: hidden;
    background: var(--bg-card-soft);
	box-shadow: .3rem .6rem .6rem rgba(0, 0, 0, .4);
	--wave-color: 9, 45, 197;
}

body.dark .radio-player-shell {
    --wave-color: 255, 255, 255;
}

.radio-player-shell__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 0px;
    box-shadow: 0.3rem 0.6rem 0.6rem rgba(0, 0, 0, 0.4);
}

.radio-player-shell__poster {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.radio-player-shell__poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
		to top,
		rgba(0,0,0,0.15),
		rgba(0,0,0,0.05)
	);
}

.radio-player-shell__waves {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 45%),
        linear-gradient(180deg, var(--bg-card-soft), var(--bg-secondary));
}

body.dark .radio-player-shell__waves {
    background:
        radial-gradient(circle at top, rgba(96, 165, 250, 0.16), transparent 45%),
        linear-gradient(180deg, #0f172a, #111827);
}

.radio-player-shell__waves-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.radio-player-shell__screen {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    width: 20px;
    height: 20px;
    background: url('/images/radioplayer/full.svg') no-repeat center;
    cursor: pointer;
    opacity: 0.9;
}

.radio-player-shell.is-fullscreen .radio-player-shell__screen {
    background: url('/images/radioplayer/small.svg') no-repeat center;
}

.radio-player {
    position: relative;
    z-index: 2;
    width: 100%;
	height: 100%;
    min-height: 420px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-player__inner {
    width: 100%;
    max-width: 210px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(0, 0, 0, .62);
    border: 1px solid var(--border-player, #e5e7eb);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

body.dark .radio-player__inner {
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.radio-player__logo-row {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.radio-player__logo-box {
    width: 52px;
    height: 52px;
    padding: 4px;
    border: 1px solid var(--border-player, #e5e7eb);
    /* background: var(--bg-card); */
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--overlay-soft);
}

body.dark .radio-player__logo-box {
    border-color: var(--border-strong);
    /* background: rgba(255, 255, 255, 0.96); */
}

.radio-player__logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.radio-player__title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 12px;
}

.radio-player__visual {
    position: relative;
    width: 100%;
    height: 100px;
    border: 1px solid var(--border-player, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    /* background: rgba(255, 255, 255, 0.34); */
}

body.dark .radio-player__visual {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.radio-player__bars,
.radio-player__loading {
    position: absolute;
    inset: 0;
}

.radio-player__bars {
    width: 100%;
    height: 100%;
    display: block;
}

.radio-player__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 16px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
}

.radio-player.is-loading .radio-player__loading {
    opacity: 1;
    visibility: visible;
}

.radio-player__bitrate-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.radio-player__bitrate-label {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.radio-player__playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.radio-player__playlist-item {
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    transition: color .2s ease, opacity .2s ease;
}

.radio-player__playlist-item:hover {
    color: #ffa500;
}

.radio-player__playlist-item.active {
    color: #ffa500;
    font-weight: 700;
}

.radio-player__audio {
    display: none;
}

.radio-player__volume {
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
	border: none;
    border-radius: 999px;
    background: linear-gradient(to right, rgb(255, 0, 0) 30%, rgb(204, 204, 204) 30%);
    outline: none;
    cursor: pointer;
}

.radio-player__volume::-webkit-slider-thumb{
    -webkit-appearance:none;
    appearance:none;
    width:17px;
    height:17px;
    border-radius:50%;
    background:#fff;
    border:3px solid #ff0000;
}

.radio-player__volume::-moz-range-thumb{
    width:17px;
    height:17px;
    border-radius:50%;
    background:#fff;
    border:3px solid #ff0000;
}

.radio-player__controls {
    display: flex;
    /* align-items: flex-end; */
    justify-content: space-between;
    gap: 10px;
}

.radio-player__icon-btn {
    width: 32px;
    height: 32px;
    border: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    cursor: pointer;
    padding: 0;
    opacity: 0.92;
    transition: transform .2s ease, opacity .2s ease;
}

.radio-player__icon-btn:hover,
.radio-player__play-btn:hover,
.radio-player-shell__screen:hover {
    opacity: 1;
    transform: scale(1.04);
}

.radio-player__icon-btn--mute {
    background-image: url('/images/radioplayer/volume.svg');
}

.radio-player.is-muted .radio-player__icon-btn--mute {
    background-image: url('/images/radioplayer/mute.svg');
}

.radio-player__icon-btn--graff {
    background-image: url('/images/radioplayer/graff-1.svg');
}

.radio-player.is-graff-hidden .radio-player__icon-btn--graff {
    background-image: url('/images/radioplayer/graff-no.svg');
}

.radio-player__play-btn {
    width: 71px;
    height: 71px;
    border: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    cursor: pointer;
    padding: 0;
    margin-top: 14px;
    background-image: url('/images/radioplayer/play.svg');
    transition: transform .2s ease, opacity .2s ease;
}

.radio-player.is-playing .radio-player__play-btn {
    background-image: url('/images/radioplayer/pause.svg');
}

.radio-player.is-graff-hidden .radio-player__bars {
    opacity: 0;
}

.radio-player--admin {
    max-width: none;
    min-height: 380px;
}

.bitrate-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bitrate-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bitrate-item {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
}

.bitrate-item__grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 100px;
    gap: 12px;
    align-items: end;
}

.bitrate-item__col--remove {
    display: flex;
    align-items: end;
}


/* Tablet — статичные волны */
.radio-player-shell.waves-static .radio-player-shell__waves {
    background:
        linear-gradient(160deg, rgba(188,204,255,0.15) 0%, transparent 40%),
        repeating-linear-gradient(
            -15deg,
            rgba(188,204,255,0.12),
            rgba(188,204,255,0.12) 1px,
            transparent 1px,
            transparent 14px
        ),
        var(--bg-card-soft);
}

/* Dark theme */
body.dark .radio-player-shell.waves-static .radio-player-shell__waves {
    background:
        linear-gradient(160deg, rgba(120,155,255,0.12) 0%, transparent 40%),
        repeating-linear-gradient(
            -15deg,
            rgba(120,155,255,0.10),
            rgba(120,155,255,0.10) 1px,
            transparent 1px,
            transparent 14px
        ),
        #0f172a;
}

/* .radio-player-shell.waves-disabled .radio-player-shell__waves {
    display: none;
} */

.radio-player-shell.waves-disabled {
    background: var(--bg-card-soft);
}

body.dark .radio-player-shell.waves-disabled {
    background: #0f172a;
}

.radio-player-shell.waves-static .radio-player-shell__waves-canvas,
.radio-player-shell.waves-disabled .radio-player-shell__waves-canvas {
    display: none;
}

/* =========================
   MEDIA QUERIES
========================= */

@media (min-width: 780px) {
	.page-radio-single .radio-player {
		aspect-ratio: 16 / 9;
	}
	.page-radio-single .radio-player-shell {
		aspect-ratio: 16 / 9;
	}
	.page-radio-single .radio-player-shell__waves {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 768px) {
    .bitrate-item__grid {
        grid-template-columns: 1fr;
    }

    .bitrate-item__col--remove {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .radio-player {
        min-height: 400px;
        padding: 10px;
    }

    .radio-player__inner {
        max-width: 200px;
        padding: 14px;
    }

    .radio-player__visual {
        height: 90px;
    }

    .radio-player__play-btn {
        width: 56px;
        height: 56px;
    }

    .radio-player__icon-btn {
        width: 26px;
        height: 26px;
    }

    .radio-player__title {
        font-size: 15px;
    }

    .radio-player__bitrate-label,
    .radio-player__playlist-item {
        font-size: 13px;
    }
}
