.irancast-keep-player {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	max-width: 520px;
	margin: 0 auto;
	background: color-mix(in srgb, var(--maincolor, #da2f37) 94%, #000);
	color: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
	border-radius: 16px;
	padding: 8px 10px;
	direction: rtl;
}

/* Never show a full in-page player chrome inside the mini bar. */
.irancast-keep-player .irancast-player {
	display: none !important;
}

.irancast-keep-player > audio {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.irancast-keep-player[hidden] {
	display: none !important;
}

.irancast-keep-player__inner {
	display: flex;
	align-items: center;
	gap: 8px;
}

.irancast-keep-player__play {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--maincolor, #da2f37);
	cursor: pointer;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.irancast-keep-player__main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.irancast-keep-player__progress-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.irancast-keep-player__progress {
	flex: 1 1 auto;
	height: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	cursor: pointer;
	overflow: hidden;
}

.irancast-keep-player__bar {
	display: block;
	height: 100%;
	width: 0;
	background: #fff;
	border-radius: inherit;
}

.irancast-keep-player__time {
	flex: 0 0 auto;
	font-size: 10px;
	opacity: 0.85;
	display: flex;
	gap: 3px;
	font-variant-numeric: tabular-nums;
	min-width: 4.5em;
	justify-content: flex-end;
}

.irancast-keep-player__toggle {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.irancast-keep-player__toggle:hover {
	background: rgba(255, 255, 255, 0.2);
}

.irancast-keep-player:not(.is-collapsed) .irancast-keep-player__toggle i {
	transform: rotate(180deg);
}

.irancast-keep-player__extra {
	display: none;
}

.irancast-keep-player:not(.is-collapsed) .irancast-keep-player__extra {
	display: block;
}

.irancast-keep-player:not(.is-collapsed) .irancast-keep-player__extra-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.irancast-keep-player__crumb {
	display: block;
	font-size: 10px;
	line-height: 1.35;
	opacity: 0.78;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: rgba(255, 255, 255, 0.9);
}

.irancast-keep-player__crumb:empty {
	display: none;
}

.irancast-keep-player__title {
	display: block;
	color: #fff;
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.irancast-keep-player__skip,
.irancast-keep-player__speed,
.irancast-keep-player__mute,
.irancast-keep-player__close {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border-radius: 10px;
	height: 30px;
	padding: 0 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
}

.irancast-keep-player__skip i {
	font-size: 11px;
}

.irancast-keep-player__speed {
	border-radius: 999px;
	min-width: 40px;
}

.irancast-keep-player__close {
	border: 0;
	background: transparent;
	font-size: 20px;
	min-width: 28px;
	opacity: 0.85;
}

body.irancast-keep-playing-active {
	padding-bottom: 72px;
}

body.irancast-keep-playing-active:has(.irancast-keep-player:not(.is-collapsed)) {
	padding-bottom: 118px;
}

@media (max-width: 576px) {
	.irancast-keep-player {
		left: 8px;
		right: 8px;
		max-width: none;
	}

	.irancast-keep-player__skip span {
		display: none;
	}

	.irancast-keep-player__time .irancast-keep-player__duration {
		display: none;
	}
}
