/* =========================
   Online Radios (Player UI)
   Version 2.1.2
   ========================= */

: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-btn-icon: var(--or-accent);
	--or-favorite-icon: var(--or-accent);
	--or-favorite-active-bg: var(--or-accent);
	--or-favorite-active-icon: #ffffff;
	--or-search-bg: #202c4c;
	--or-live: #7ff39d;
	--or-live-dot: #2fd35e;
	--or-offline: #ff8f8f;
	--or-offline-dot: #ff3b3b;
}

/* =========================
   Design classes
   ========================= */

.or-design-classic {
	--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-btn-icon: var(--or-accent);
	--or-favorite-icon: var(--or-accent);
	--or-favorite-active-bg: var(--or-accent);
	--or-favorite-active-icon: #ffffff;
	--or-search-bg: #202c4c;
}

.or-design-none {
	--or-accent: currentColor;
	--or-track: currentColor;
	--or-border: currentColor;
	--or-bg-1: transparent;
	--or-bg-2: transparent;
	--or-text: inherit;
	--or-btn-bg: transparent;
	--or-btn-hover: transparent;
	--or-btn-icon: currentColor;
	--or-favorite-icon: currentColor;
	--or-favorite-active-bg: currentColor;
	--or-favorite-active-icon: Canvas;
	--or-search-bg: transparent;
}

.or-design-light {
	--or-accent: #0b78ff;
	--or-track: #d7dce5;
	--or-border: #d7dce5;
	--or-bg-1: #ffffff;
	--or-bg-2: #f3f5f8;
	--or-text: #111827;
	--or-btn-bg: #ffffff;
	--or-btn-hover: #eef2f7;
	--or-btn-icon: var(--or-accent);
	--or-favorite-icon: var(--or-accent);
	--or-favorite-active-bg: var(--or-accent);
	--or-favorite-active-icon: #ffffff;
	--or-search-bg: #ffffff;
}

.or-design-minimal {
	--or-accent: #ffffff;
	--or-track: rgba(255,255,255,0.55);
	--or-border: rgba(255,255,255,0.18);
	--or-bg-1: #111827;
	--or-bg-2: #111827;
	--or-text: #ffffff;
	--or-btn-bg: rgba(255,255,255,0.12);
	--or-btn-hover: rgba(255,255,255,0.2);
	--or-btn-icon: #ffffff;
	--or-favorite-icon: #ffffff;
	--or-favorite-active-bg: #ffffff;
	--or-favorite-active-icon: #111827;
	--or-search-bg: #111827;
}

/* =========================
   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-design-none.or-container,
.or-design-none .or-station-card,
.or-design-none .or-search-input {
	background: transparent !important;
	color: inherit !important;
}

.or-design-none.or-container,
.or-design-none .or-station-card {
	border-color: currentColor;
}

.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;
}

.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;
	color: var(--or-btn-icon);
}

.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%;
}

.or-play-svg,
.or-pause-svg,
.or-forward-button svg,
.or-station-card-play svg {
	fill: var(--or-btn-icon) !important;
}

.or-favorite-button svg {
	stroke: var(--or-favorite-icon) !important;
	fill: none !important;
}

.or-favorite-button.is-active {
	background: var(--or-favorite-active-bg);
}

.or-favorite-button.is-active svg {
	stroke: var(--or-favorite-active-icon) !important;
	fill: var(--or-favorite-active-icon) !important;
}

/* =========================
   Loading spinner
   ========================= */

.or-spinner {
	width: 22px;
	height: 22px;
	border: 3px solid color-mix(in srgb, var(--or-accent) 25%, transparent);
	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;
}

.or-volume-slider {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 200px;
	max-width: 200px;
	background: transparent;
	margin: 0;
}

.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;
}

.or-volume-slider::-moz-range-track,
.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;
}

.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: var(--or-text);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	padding: 8px 10px;
}

.or-design-none .or-sleep-select {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

.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 {
	width: 100%;
	max-width: 100%;
	margin: 20px auto 0;
	box-sizing: border-box;
	color: var(--or-text);
}

.or-station-listing-grid {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	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-design-none .or-station-card-name,
.or-design-none .or-station-card-location,
.or-design-none .or-station-card-link,
.or-design-none .or-station-card-link:hover {
	color: inherit;
}

.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;
	color: var(--or-btn-icon);
}

.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-btn-icon);
}

.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: var(--or-text);
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
}

.or-design-none .or-pagination-button {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

.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-design-none .or-station-listing-empty {
	background: transparent;
	border-color: currentColor;
}

.or-station-card-link-disabled {
	cursor: default;
	text-decoration: none;
}

@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: var(--or-search-bg) !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: color-mix(in srgb, var(--or-text) 75%, transparent);
}

.or-search-input:focus {
	outline: none;
	border-color: var(--or-accent) !important;
}

.or-search-submit {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--or-text);
	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;
}


/* Admin-configurable lightweight appearance variables */
.or-container { max-width: var(--or-player-max-width, 768px); border-radius: var(--or-radius, 8px); padding: var(--or-player-padding, 15px); }
.or-logo:not(.or-logo-compact) { width: var(--or-regular-logo-size, 170px); height: var(--or-regular-logo-size, 170px); max-width: none; object-fit: contain; padding: 0; margin: 0; }
.or-logo-compact { width: var(--or-compact-logo-size, 50px); height: var(--or-compact-logo-size, 50px); object-fit: contain; padding: 0; }
.or-play-button { width: var(--or-button-size, 48px); height: var(--or-button-size, 48px); }
.or-volume-slider { width: var(--or-volume-width, 140px); }
.or-field-link { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.or-field-link:hover { text-decoration-thickness: 2px; }


/* Regular player column layout */
.or-container:not(.or-container-compact) {
	display: grid;
	grid-template-columns: var(--or-regular-logo-size, 170px) minmax(0, 1fr);
	column-gap: var(--or-column-gap, 20px);
	align-items: start;
}

.or-container:not(.or-container-compact) > .or-left-column {
	float: none;
	width: auto;
	min-width: 0;
}

.or-container:not(.or-container-compact) > .or-right-column {
	margin-left: 0;
	min-width: 0;
}

@media (max-width: 700px) {
	.or-container:not(.or-container-compact) {
		display: block;
	}
}
