/* =========================
   Online Radios (Player UI)
   Version 2.0
   ========================= */

:root {
	--or-accent: #d877fe;
	--or-track: #ffffff;
	--or-border: #333e5c;
	--or-bg-1: #202c4c;
	--or-bg-2: #111c38;
	--or-text: #ffffff;
	--or-btn-bg: #ffffff;
	--or-btn-hover: #f7f8f9;
	--or-favorite-active: #cfefff;
	--or-favorite-active-icon: #4aa8ff;
	--or-live: #7ff39d;
	--or-live-dot: #2fd35e;
	--or-offline: #ff8f8f;
	--or-offline-dot: #ff3b3b;
}

/* =========================
   Base layout
   ========================= */

.or-container {
	overflow: hidden;
	border-radius: 10px;
	border: 1px solid var(--or-border);
	padding: 15px;
	background: linear-gradient(165deg, var(--or-bg-1), var(--or-bg-2));
	color: var(--or-text);
	margin: 0 auto;
}

.or-left-column {
	float: left;
	width: 170px;
}

.or-logo {
	display: block;
	max-width: 150px;
	height: auto;
	border-radius: 10px;
}

.or-right-column {
	margin-left: 190px;
}

.or-row1,
.or-row2,
.or-row3,
.or-row4 {
	margin: 0;
	overflow: visible;
}

/* =========================
   Text content
   ========================= */

.or-station-name {
	float: none;
	display: block;
	font-size: 1.6rem;
	font-weight: bold;
}

.or-row2 {
	margin-top: 6px;
}

.or-city-freq {
	display: block;
	font-size: 1rem;
}

.or-status-line {
	display: block;
	font-size: 1rem;
	min-height: 1.4em;
}

.or-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.or-status-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: inline-block;
}

.or-status-live {
	color: var(--or-live);
}

.or-status-live .or-status-dot {
	background: var(--or-live-dot);
}

.or-status-offline {
	color: var(--or-offline);
}

.or-status-offline .or-status-dot {
	background: var(--or-offline-dot);
}

/* =========================
   Utility / misc
   ========================= */

.or-station-list {
	display: none;
}

.or-error {
	color: red;
	font-weight: bold;
}

.or-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* =========================
   Controls row
   ========================= */

.or-row3 {
	display: flex;
	align-items: center;
	margin: 20px 0 0;
	gap: 20px;
}

/* Main buttons */
.or-play-button,
.or-forward-button,
.or-favorite-button {
	background: var(--or-btn-bg);
	border: none;
	cursor: pointer;
	width: 50px;
	height: 50px;
	border-radius: 50px;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.or-favorite-button {
	margin-left:20px;
}

.or-play-button:hover,
.or-play-button:focus,
.or-play-button:active,
.or-forward-button:hover,
.or-forward-button:focus,
.or-forward-button:active,
.or-favorite-button:hover,
.or-favorite-button:focus,
.or-favorite-button:active {
	background-color: var(--or-btn-hover);
}

.or-play-button svg,
.or-forward-button svg,
.or-favorite-button svg {
	width: 100%;
	height: 100%;
}

/* Play / pause / forward icon colors */
.or-play-svg,
.or-pause-svg,
.or-forward-button svg {
	fill: var(--or-accent) !important;
}

/* Favorite button states */
.or-favorite-button svg {
	stroke: var(--or-accent) !important;
	fill: none !important;
}

.or-favorite-button.is-active {
	background: var(--or-accent);
}

.or-favorite-button.is-active svg {
	stroke: #ffffff!important;
	fill: #ffffff!important;
}

/* =========================
   Loading spinner
   ========================= */

.or-spinner {
	width: 22px;
	height: 22px;
	border: 3px solid rgba(216, 119, 254, 0.25);
	border-top-color: var(--or-accent);
	border-radius: 50%;
	display: inline-block;
	animation: or-spin 0.8s linear infinite;
}

@keyframes or-spin {
	to {
		transform: rotate(360deg);
	}
}

/* =========================
   Volume control
   ========================= */

.or-volume-container {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
}

.or-speaker-icon {
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}

/* base reset */
.or-volume-slider {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 200px;
	max-width: 200px;
	background: transparent;
	margin: 0;
}

/* WebKit */
.or-volume-slider::-webkit-slider-runnable-track {
	height: 6px;
	background: var(--or-track);
	border-radius: 3px;
}

.or-volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	background: var(--or-accent);
	border: 2px solid var(--or-track);
	border-radius: 50%;
	margin-top: -5px;
	cursor: pointer;
}

/* Firefox */
.or-volume-slider::-moz-range-track {
	height: 6px;
	background: var(--or-track);
	border-radius: 3px;
}

.or-volume-slider::-moz-range-progress {
	height: 6px;
	background: var(--or-track);
	border-radius: 3px;
}

.or-volume-slider::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--or-accent);
	border: 2px solid var(--or-track);
	border-radius: 50%;
	cursor: pointer;
}

/* MS / legacy */
.or-volume-slider::-ms-track {
	height: 6px;
	background: transparent;
	border-color: transparent;
	color: transparent;
}

.or-volume-slider::-ms-fill-lower,
.or-volume-slider::-ms-fill-upper {
	background: var(--or-track);
	border-radius: 3px;
}

.or-volume-slider::-ms-thumb {
	width: 16px;
	height: 16px;
	background: var(--or-accent);
	border: 2px solid var(--or-track);
	border-radius: 50%;
	cursor: pointer;
}

/* =========================
   Sleep timer row
   ========================= */

.or-row4 {
	margin-top: 12px;
}

.or-sleep-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

.or-sleep-icon {
	flex: 0 0 auto;
}

.or-sleep-select {
	flex: 0 0 auto;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	padding: 8px 10px;
}

.or-sleep-remaining {
	display: none;
	font-size: 0.95rem;
	opacity: 0.95;
}

/* =========================
   Mobile layout
   ========================= */

@media (max-width: 700px) {
	.or-left-column {
		float: none;
		width: 100%;
		text-align: center;
	}

	.or-logo {
		margin: 0 auto;
	}

	.or-right-column {
		margin-left: 0;
		margin-top: 12px;
		text-align: center;
	}

	.or-row1,
	.or-row2,
	.or-row3 {
		text-align: center;
		justify-content: center;
	}

	.or-station-name {
		text-align: center;
	}

	.or-city-status-line {
		justify-content: center;
	}

	.or-row3 {
		flex-wrap: wrap;
		gap: 12px;
		justify-content: center;
	}

	.or-volume-container {
		width: 100%;
		justify-content: center;
	}

	.or-volume-slider {
		width: 200px;
		max-width: 200px;
	}

	.or-sleep-container {
		flex-wrap: wrap;
	}
}

/* =========================
   Compact player
   ========================= */

.or-container-compact {
	padding: 10px 12px;
}

.or-compact-inner {
	display: flex;
	align-items: center;
	gap: 12px;
}

.or-compact-logo-wrap {
	flex: 0 0 auto;
}

.or-logo-compact {
	max-width: 50px;
	width: 50px;
	height: 50px;
	object-fit: cover;
	margin: 0;
}

.or-compact-content {
	flex: 1 1 auto;
	min-width: 0;
}

.or-station-name-compact {
	float: none;
	display: block;
	font-size: 1rem;
	line-height: 1.2;
}

.or-status-line-compact {
	font-size: 0.9rem;
	margin-top: 4px;
}

.or-compact-play-button {
	margin-right: 0;
}

/* =========================
   Shared station listing cards
   ========================= */

.or-station-listing {
	margin-top: 20px;
}

.or-station-listing-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.or-station-card {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid var(--or-border);
	background: linear-gradient(165deg, var(--or-bg-1), var(--or-bg-2));
	color: var(--or-text);
	border-radius: 10px;
	padding: 10px 12px;
	min-height: 72px;
}

.or-station-card-link {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.or-station-card-link:hover {
	text-decoration: none;
	color: var(--or-text);
}

.or-station-card-logo-wrap {
	flex: 0 0 auto;
}

.or-station-card-name,
.or-station-card-location,
.or-station-card-link {
	color: var(--or-text);
}

.or-station-card-logo {
	width: 50px;
	height: 50px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.or-station-card-content {
	flex: 1 1 auto;
	min-width: 0;
}

.or-station-card-name {
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.or-station-card-location {
	font-size: 0.92rem;
	opacity: 0.9;
	margin-top: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.or-station-card-play {
	background: var(--or-btn-bg);
	border: none;
	cursor: pointer;
	width: 50px;
	height: 50px;
	border-radius: 50px;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.or-station-card-play:hover,
.or-station-card-play:focus,
.or-station-card-play:active {
	background-color: var(--or-btn-hover);
}

.or-station-card-play svg {
	width: 100%;
	height: 100%;
	fill: var(--or-accent);
}

.or-station-listing-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
}

.or-pagination-button {
	background: rgba(255,255,255,0.1);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
}

.or-pagination-button:hover,
.or-pagination-button:focus {
	background: rgba(255,255,255,0.16);
}

.or-pagination-button:disabled {
	opacity: 0.45;
	cursor: default;
}

.or-pagination-info {
	font-size: 0.95rem;
	opacity: 0.95;
}

.or-station-listing-empty {
	border: 1px solid rgba(255,255,255,0.12);
	background: rgba(255,255,255,0.04);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
}

.or-station-card-link-disabled {
	cursor: default;
	text-decoration: none;
}

/* =========================
   Mobile adjustments
   ========================= */

@media (max-width: 786px) {
	.or-station-listing-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Search shortcode
   ========================= */

.or-search-box-wrap {
	margin-bottom: 14px;
}

.or-search-form {
	position: relative;
	width: 100%;
}

.or-search-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	max-width: 100%;
	height: 50px;
	padding: 10px 52px 10px 14px;
	border-radius: 10px!important;
	border: 1px solid var(--or-border)!important;
	background: #202c4c !important;
	color: var(--or-text) !important;
	box-sizing: border-box;
	box-shadow: none;
}

.or-search-input::-webkit-search-decoration,
.or-search-input::-webkit-search-cancel-button,
.or-search-input::-webkit-search-results-button,
.or-search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.or-search-input::placeholder {
	color: rgba(255,255,255,0.75);
}

.or-search-input:focus {
	outline: none;
	border-color: var(--or-accent);
}

.or-search-submit {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.or-search-submit:hover,
.or-search-submit:focus {
	opacity: 0.9;
	outline: none;
}

.or-search-submit-icon {
	display: block;
	width: 20px;
	height: 20px;
}

/* =========================
   Now Playing metadata
   ========================= */

.or-now-playing {
	display: block;
	margin-top: 4px;
	font-size: 0.95rem;
	opacity: 0.95;
}

.or-now-playing-label {
	font-weight: 600;
	margin-right: 6px;
}

.or-now-playing-text {
	opacity: 0.9;
}

.or-city-status-line {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.or-city-name {
	font-size: 1rem;
	display: inline-block;
}

.or-row4-wrap {
	margin: 10px auto 0;
	padding: 0;
	text-align:center;
}

.or-row4-wrap .or-row4 {
	margin-top: 0;
	display: flex;
	justify-content: center;
}

.or-row4-wrap .or-sleep-container {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}