/* Radio Wey Player — floating BBC-style audio bar */

.rwp-player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 96px;        /* taller bar */
	padding: 14px 28px;      /* more breathing room, esp. on the right */
	background: #fafafa;
	border-top: 3px solid #1f6fb2;   /* Radio Wey blue accent */
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
	font-family: inherit;
	color: #222;
	transform: translateY(0);
	transition: transform 0.25s ease;
}
.rwp-player * { box-sizing: border-box; }

.rwp-player[hidden] {
	display: none;
}

/* Slide-in animation when activated */
.rwp-player.rwp-enter {
	transform: translateY(110%);
}

/* --- Episode meta (artwork + title) --- */
.rwp-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 0 1 240px;
}
.rwp-art {
	width: 56px;
	height: 56px;
	border-radius: 4px;
	object-fit: cover;
	background: #e9e9e9;
	flex: 0 0 auto;
}
.rwp-art[src=""] { visibility: hidden; }
.rwp-titles {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.rwp-title {
	font-weight: 600;
	font-size: 14px;
	color: #1f6fb2;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.rwp-by {
	font-size: 12px;
	color: #666;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* --- Transport controls --- */
.rwp-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}
.rwp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: transparent;
	color: #333;
	cursor: pointer;
	border-radius: 50%;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease;
}
.rwp-btn:hover { background: rgba(0, 0, 0, 0.07); }
.rwp-btn:focus-visible { outline: 2px solid #1f6fb2; outline-offset: 2px; }

/* Skip ±20 buttons — large like the reference */
.rwp-back, .rwp-fwd { width: 46px; height: 46px; }
.rwp-back svg, .rwp-fwd svg { width: 34px; height: 34px; }

/* Big central play / pause button */
.rwp-play {
	width: 56px;
	height: 56px;
	border: 2px solid #333;
}
.rwp-play svg { width: 24px; height: 24px; }

/* Play/pause toggle — only one icon visible at a time.
   These selectors are MORE specific than a generic ".rwp-btn svg" so the
   display:none actually wins (an earlier blanket rule made both show). */
.rwp-play .rwp-ico-play  { display: block; }
.rwp-play .rwp-ico-pause { display: none; }
.rwp-player.rwp-playing .rwp-play .rwp-ico-play  { display: none; }
.rwp-player.rwp-playing .rwp-play .rwp-ico-pause { display: block; }

/* --- Progress / scrubber --- */
.rwp-progress {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;     /* allow the bar to shrink so the right cluster stays on-screen */
}
.rwp-time {
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	color: #555;
	flex: 0 0 auto;
}
.rwp-seek, .rwp-vol {
	-webkit-appearance: none;
	appearance: none;
	height: 4px;
	border-radius: 2px;
	background: #ccc;
	cursor: pointer;
}
/* width set with higher specificity below to beat Bootstrap's input[type=range] */
.rwp-seek { flex: 1 1 auto; min-width: 0; }

.rwp-seek::-webkit-slider-thumb,
.rwp-vol::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #1f6fb2;     /* Radio Wey blue */
	border: none;
	cursor: pointer;
}
.rwp-seek::-moz-range-thumb,
.rwp-vol::-moz-range-thumb {
	width: 15px;
	height: 15px;
	border: none;
	border-radius: 50%;
	background: #1f6fb2;     /* Radio Wey blue */
	cursor: pointer;
}

/* --- Right cluster: volume + close --- */
.rwp-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;          /* never shrink — keeps volume + close visible */
	margin-left: 8px;
}

/* Bootstrap applies width:80% to all input[type=range]; override it so the
   sliders take their intended size instead of overflowing off-screen. */
.rwp-player .rwp-vol {
	width: 90px !important;
	flex: 0 0 auto;
}
.rwp-player .rwp-seek {
	width: auto !important;   /* flex-grows within .rwp-progress */
}

/* --- Responsive: simplified mobile layout ---
   Title on top, then one tidy row: [play] [seek] [time].
   Skip ±20 and the volume slider are hidden — on touch devices people use the
   phone's own volume, and the seek bar is the control that matters. */
@media (max-width: 680px) {
	.rwp-player {
		flex-wrap: wrap;
		gap: 8px 12px;
		min-height: 0;
		padding: 10px 14px;
	}

	/* Title row spans the full width, on top */
	.rwp-meta {
		flex: 1 1 100%;
		order: -1;
	}

	/* Hide skip buttons on mobile */
	.rwp-back,
	.rwp-fwd {
		display: none;
	}

	/* Hide the volume slider + mute on mobile.
	   High specificity + !important to beat the earlier ".rwp-player .rwp-vol"
	   width rule and stop the range thumb from bleeding through. */
	.rwp-player .rwp-vol,
	.rwp-player .rwp-mute {
		display: none !important;
		width: 0 !important;
	}

	/* Keep just the close button, floated to the top-right by the title */
	.rwp-right {
		position: absolute;
		top: 8px;
		right: 10px;
		margin: 0;
		gap: 0;
	}

	/* Don't let the title text run under the close button */
	.rwp-meta { padding-right: 40px; }

	/* Controls + progress sit on one clean row */
	.rwp-controls {
		flex: 0 0 auto;
		gap: 0;
	}
	.rwp-progress {
		flex: 1 1 auto;
	}

	/* Slightly smaller play button to fit the row comfortably */
	.rwp-play {
		width: 48px;
		height: 48px;
	}
	.rwp-time.rwp-dur {
		display: none;   /* keep just the elapsed time on narrow screens */
	}
}

/* --- Play buttons on Listen Again cards --- */
.rwp-card-play {
	position: absolute;
	left: 8px;
	bottom: 8px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(31, 111, 178, 0.92);   /* Radio Wey blue */
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.rwp-card-play svg { width: 20px; height: 20px; }

/* Show the button on hover/focus, or whenever this card is the active track */
.weyplayer-card:hover .rwp-card-play,
.rwp-card-play:focus-visible,
.rwp-card-play.rwp-active {
	opacity: 1;
	transform: translateY(0);
}
.rwp-card-play:hover { background: #1f6fb2; }

/* Active (loaded) track gets a darker, always-visible button */
.rwp-card-play.rwp-active { background: #14517f; }

/* Icon toggle: play by default, pause only while this card is actually playing */
.rwp-card-ico-pause { display: none; }
.rwp-card-play.rwp-playing .rwp-card-ico-play  { display: none; }
.rwp-card-play.rwp-playing .rwp-card-ico-pause { display: block; }

/* --- On-page Play/Pause button (single episode page) ---
   Reuses .rwp-card-play behaviour but renders as a BBC-style bar button,
   replacing the old inline <audio> element. */
.rwp-page-play {
	position: static;
	width: 160px;                  /* fixed width — doesn't resize on Play/Pause */
	height: auto;
	border-radius: 4px;
	opacity: 1;
	transform: none;
	box-shadow: none;
	background: #1f6fb2;            /* Radio Wey blue */
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;       /* centre icon + label within the fixed width */
	gap: 10px;
	padding: 12px 22px;
	margin: 0 0 15px;
	font-size: 16px;
	font-weight: 700;
	transition: background 0.2s ease;
}
.rwp-page-play:hover,
.rwp-page-play:focus-visible { background: #14517f; }
.rwp-page-play.rwp-active   { background: #14517f; }

.rwp-page-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.rwp-page-play svg { width: 22px; height: 22px; }
.rwp-page-label { line-height: 1; }

/* --- Schedule page layout ---
   Moved here from the template's inline <style> (which rendered after </body>
   and was being dropped, breaking the presenter-image layout). */
.content-area a { color: black; }

.schedule-slot {
	background-color: #fff;
	padding: 20px;
	margin-bottom: 20px;
}
.schedule-show {
	float: right;
	width: 70%;
}
.schedule-onair {
	border: 1px solid black;
	font-size: 12px;
	padding: 5px;
	border-radius: 4px;
	width: 75px;
}
.schedule-desc {
	margin-top: 10px;
	border-top: 3px solid #f5c92e;
}
.schedule-slot .profile_picture {
	float: left;
	width: 25%;
	background-color: #5d5d5d;
	border-radius: 5px;
	padding: 10px;
}
.schedule-slot .profile_picture img {
	width: 100%;
	height: auto;
	display: block;
}
.schedule-slot .presenter-name {
	text-align: center;
	padding-top: 5px;
}

/* "Total Page Visits" counter (page-visit-counter plugin), shown below the
   <hr> on episode pages — float it right and make it smaller/subtler. */
.page_counter_label {
	margin-bottom: 10px;
	float: right;
	font-size: 0.8em;
}
