/* Shikme FM popup — theme-agnostic: colors derive from currentColor/opacity
   (same approach as poll.css, survives all runtime theme swaps). */

#fm_box .modal_menu ul {
	margin: 0;
	padding: 0;
}

/* Footer button (radio icon): sized like the .i_btm font icons;
   fill inherits currentColor so the theme_color active state tints it */
.fm_btn_icon {
	width: 25px;
	height: 25px;
	display: inline-block;
	/* +4px top: nudges the glyph level with the neighboring footer icons */
	margin: 2px auto 0;
}

/* Pre-content loading state (shown while the box HTML is being fetched) */
.fm_loading {
	padding: 40px 10px;
	text-align: center;
	font-size: 14px;
	opacity: 0.7;
}
.fm_loading i {
	margin-right: 8px;
}

/* Now playing card */
#fm_now {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid rgba(128, 128, 128, 0.25);
	border-radius: 12px;
	background: rgba(128, 128, 128, 0.08);
}
#fm_now.fm_silent {
	opacity: 0.65;
}
#fm_listen {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid currentColor;
	border-radius: 50%;
	cursor: pointer;
	font-size: 15px;
}
#fm_listen:hover {
	background: rgba(128, 128, 128, 0.15);
}
#fm_listen_icon.fa-play {
	margin-left: 3px; /* optical centering of the triangle */
}
.fm_now_main {
	flex: 1 1 auto;
	min-width: 0;
}
#fm_now_title {
	font-weight: bold;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#fm_now_title_in {
	display: inline-block;
	white-space: nowrap;
}
/* Overflowing titles scroll back and forth with pauses at both ends;
   --fm-scroll/--fm-dur are set from js/fm.js after measuring */
#fm_now_title.fm_scroll {
	text-overflow: clip;
}
#fm_now_title.fm_scroll #fm_now_title_in {
	animation: fm_title_scroll var(--fm-dur, 10s) linear infinite;
}
@keyframes fm_title_scroll {
	0%, 14% { transform: translateX(0); }
	44%, 56% { transform: translateX(var(--fm-scroll, 0px)); }
	86%, 100% { transform: translateX(0); }
}
#fm_now_user {
	opacity: 0.65;
	font-size: 11px;
	margin: 1px 0 6px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fm_now_bar {
	height: 4px;
	border-radius: 2px;
	background: rgba(128, 128, 128, 0.25);
	overflow: hidden;
}
#fm_now_fill {
	height: 100%;
	width: 0;
	border-radius: 2px;
	background: currentColor;
	opacity: 0.75;
	transition: width 1s linear;
}
.fm_vol_wrap {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	opacity: 0.8;
}
#fm_vol {
	width: 64px;
	accent-color: currentColor;
	cursor: pointer;
}

.fm_listeners {
	margin-top: 8px;
	font-size: 11px;
	opacity: 0.6;
}
.fm_listeners i {
	margin-right: 4px;
}

/* Queue */
.fm_section {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 14px 0 6px 0;
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	opacity: 0.55;
}
.fm_clear_failed {
	font-weight: normal;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.fm_clear_failed:hover {
	opacity: 1;
}
#fm_list {
	max-height: 300px;
	overflow-y: auto;
}
.fm_track {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	margin: 3px 0;
	border: 1px solid rgba(128, 128, 128, 0.2);
	border-radius: 10px;
}
.fm_track.fm_on_air {
	border-color: currentColor;
	background: rgba(128, 128, 128, 0.1);
}
.fm_track_av {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}
.fm_track_main {
	flex: 1 1 auto;
	min-width: 0;
}
.fm_track_title {
	font-size: 13px;
	font-weight: bold;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fm_track_sub {
	font-size: 11px;
	opacity: 0.6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fm_st_expired, .fm_st_failed {
	opacity: 0.55;
}
.fm_track_actions {
	flex: 0 0 auto;
	display: flex;
	gap: 4px;
}
.fm_act {
	padding: 6px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	opacity: 0.65;
}
.fm_act:hover {
	opacity: 1;
	background: rgba(128, 128, 128, 0.15);
}
.fm_empty {
	padding: 18px 10px;
	text-align: center;
	opacity: 0.6;
}
/* Seam of the rotation: below it are tracks that already played this cycle */
.fm_wrap_mark {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 8px 0 4px 0;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	opacity: 0.45;
	white-space: nowrap;
}
.fm_wrap_mark::before,
.fm_wrap_mark::after {
	content: '';
	flex: 1;
	border-top: 1px solid currentColor;
	opacity: 0.5;
}

/* Log tab */
#fm_log {
	max-height: 340px;
	overflow-y: auto;
}
.fm_log_row {
	display: flex;
	gap: 10px;
	align-items: baseline;
	padding: 5px 2px;
	font-size: 12px;
	border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}
.fm_log_row:last-child {
	border-bottom: none;
}
.fm_log_time {
	flex: 0 0 auto;
	font-size: 10px;
	opacity: 0.5;
	white-space: nowrap;
}
.fm_log_text {
	min-width: 0;
	line-height: 1.4;
	word-wrap: break-word;
}
.fm_log_title {
	opacity: 0.75;
}

/* Add tab */
.fm_slots {
	font-size: 12px;
	opacity: 0.75;
	margin-bottom: 10px;
}
#fm_zone_add .full_input {
	margin-bottom: 8px;
}
#fm_drop {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 22px 12px;
	border: 2px dashed rgba(128, 128, 128, 0.4);
	border-radius: 12px;
	cursor: pointer;
	font-size: 13px;
	opacity: 0.8;
}
#fm_drop:hover, #fm_drop.fm_drag {
	border-color: currentColor;
	background: rgba(128, 128, 128, 0.08);
	opacity: 1;
}
#fm_drop i {
	font-size: 20px;
}
.fm_up_wrap {
	height: 5px;
	margin-top: 8px;
	border-radius: 3px;
	background: rgba(128, 128, 128, 0.2);
	overflow: hidden;
}
#fm_up_fill {
	height: 100%;
	width: 0;
	background: currentColor;
	opacity: 0.75;
}
.fm_or {
	text-align: center;
	margin: 10px 0;
	font-size: 11px;
	opacity: 0.5;
}
.fm_add_btn {
	width: 100%;
	text-align: center;
}
.fm_add_btn.fm_wait {
	opacity: 0.5;
	pointer-events: none;
}
.fm_hint {
	margin-top: 10px;
	font-size: 11px;
	line-height: 1.5;
	opacity: 0.55;
}
