/*! ==========================================================================
 * Saransh Dainik — Free Indian Radio Player (Floating, always visible)
 * ---------------------------------------------------------------------------
 * Floating launcher fixed above the back-to-top button (bottom-right).
 * Click launcher -> drawer expands upward. No full-screen modal.
 * z-index 9000: above normal content + sticky nav (990), below critical
 * overlays/modals (mobile nav 9999999, search modal 999999).
 * ========================================================================== */

.np-radio-player {
	position: fixed;
	right: 20px;
	bottom: 88px;                 /* above .scrollup (bottom 20px, 40px tall) */
	z-index: 9000;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	font-family: inherit;
}

/* ---- drawer (expands upward from the launcher) ---- */
.np-radio-drawer {
	width: 320px;
	max-width: calc(100vw - 24px);
	max-height: min(62vh, calc(100vh - 200px));
	display: none;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e2e5e9;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(7, 21, 47, .18);
	overflow: hidden;
}

.np-radio-drawer.np-open { display: flex; }

.np-radio-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: #07152f;
	color: #fff;
}

.np-radio-head-title { font-size: 14px; font-weight: 700; }

.np-radio-close {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}
.np-radio-close:hover { color: #ffc107; }

.np-radio-now {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 10px;
}

.np-radio-logo {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	background: #eef0f3;
	flex: 0 0 48px;
}

.np-radio-now-meta { flex: 1; min-width: 0; }

.np-radio-station-name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #16191f;
	line-height: 1.35;
}

.np-radio-station-sub { display: block; font-size: 12px; color: #8a9099; margin-top: 2px; }

.np-radio-play {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: #c8102e;
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.np-radio-play:disabled { opacity: .5; cursor: default; }
.np-radio-play:not(:disabled):hover { background: #07152f; }

.np-radio-volume {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 14px 8px;
}

.np-vol-ico { font-size: 13px; }

.np-vol-range { flex: 1; accent-color: #c8102e; cursor: pointer; }

.np-radio-status {
	font-size: 12.5px;
	color: #6b7076;
	padding: 0 14px 8px;
	min-height: 16px;
}
.np-radio-status.np-radio-error { color: #c8102e; }

.np-radio-list {
	list-style: none;
	margin: 0;
	padding: 4px 8px 10px;
	overflow-y: auto;
	max-height: 38vh;
}

.np-radio-station {
	display: flex;
	align-items: center;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #f0f2f4;
	padding: 9px 8px;
	cursor: pointer;
	border-radius: 4px;
	gap: 8px;
}
.np-radio-station:last-child { border-bottom: 0; }
.np-radio-station:hover { background: #f5f6f8; }
.np-radio-station.np-active { background: #fdf0f1; }

.np-rs-live {
	background: #c8102e;
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 3px;
	letter-spacing: .5px;
	flex: 0 0 auto;
}

.np-rs-name {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #16191f;
	line-height: 1.3;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.np-rs-sub {
	display: block;
	font-size: 11px;
	color: #8a9099;
	margin-top: 2px;
}

.np-radio-station.np-active .np-rs-name { color: #c8102e; }

/* ---- always-visible floating launcher (minimized player) ---- */
.np-radio-min {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 172px;
	max-width: 220px;
	background: #07152f;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 999px;
	padding: 10px 16px;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(7, 21, 47, .32);
	max-width: 100%;
	-webkit-transition: background .15s ease, -webkit-transform .1s ease;
	transition: background .15s ease, transform .1s ease;
}
.np-radio-min:hover { background: #c8102e; }
.np-radio-min:active { -webkit-transform: translateY(1px); transform: translateY(1px); }

.np-radio-min-ico { font-size: 16px; }

/* subtle equalizer — shown only while playing */
.np-radio-eq {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
	height: 12px;
}
.np-radio-eq i {
	width: 3px;
	background: #ffc107;
	display: block;
	-webkit-animation: np-eq 1.1s ease-in-out infinite;
	animation: np-eq 1.1s ease-in-out infinite;
}
.np-radio-eq i:nth-child(1) { height: 5px; }
.np-radio-eq i:nth-child(2) { height: 11px; -webkit-animation-delay: .25s; animation-delay: .25s; }
.np-radio-eq i:nth-child(3) { height: 7px; -webkit-animation-delay: .5s; animation-delay: .5s; }
.np-radio-eq[hidden] { display: none; }

@-webkit-keyframes np-eq { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes np-eq { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.np-radio-min-name {
	font-size: 13px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 0 1 auto;
}

.np-radio-min-toggle { font-size: 12px; }

/* ---- header / mobile trigger buttons ---- */
.hb-radio-link { display: inline-flex; align-items: center; gap: 4px; }

.mobile-radio-btn { font-size: 15px; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.np-radio-eq i { -webkit-animation: none; animation: none; opacity: .7; }
}

/* ---- responsive: compact bottom bar on mobile ---- */
@media (max-width: 480px) {
	.np-radio-player {
		left: 12px;
		right: 12px;
		bottom: 68px;             /* above back-to-top (bottom 20 + 40 tall) */
		align-items: stretch;
		gap: 8px;
	}

	.np-radio-drawer {
		width: 100%;
		max-width: calc(100vw - 24px);
		max-height: 60vh;
		-ms-flex-item-align: center;
		align-self: center;
	}

	.np-radio-min {
		width: 100%;
		min-width: 0;
		max-width: none;
		justify-content: space-between;
		border-radius: 12px;
		padding: 12px 16px;
	}

	.np-radio-min-name { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; text-align: left; padding: 0 6px; }
	.np-radio-list { max-height: 40vh; }
}

/* ---- very small screens: compact, less obstructive bottom bar ---- */
@media (max-width: 360px) {
	.np-radio-player {
		left: 8px;
		right: 8px;
		bottom: 60px;             /* stays above back-to-top */
		gap: 6px;
	}
	.np-radio-min {
		padding: 8px 12px;
		min-height: 44px;         /* keeps a comfortable touch target */
		border-radius: 10px;
	}
	.np-radio-min-name { font-size: 12px; }
	.np-radio-min-ico { font-size: 14px; }
	.np-radio-drawer { max-height: 55vh; }
	.np-radio-list { max-height: 34vh; }
}
