/* Chopin Player: speaker icon at the right end of the main nav.
   Sized and styled to match the sun/moon dark-mode toggle at the left end. */

.genesis-nav-menu .chopin-player-item {
	display: inline-block;
	vertical-align: middle;
	position: relative;
}

.chopin-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0 4px;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 50%;
	color: inherit !important;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	transition: opacity 0.4s ease;
}

.chopin-toggle,
.chopin-toggle:hover,
.chopin-toggle:focus,
.chopin-toggle:active {
	outline: none !important;
	box-shadow: none !important;
}

.chopin-toggle:hover,
.chopin-toggle:focus-visible {
	opacity: 0.65;
}

html[data-theme="dark"] .nav-primary .chopin-toggle {
	background: transparent !important;
	color: var(--dm-heading) !important;
}

.chopin-toggle svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.chopin-toggle .cp-icon { display: block; }

/* Muted: the same speaker with its sound waves faded right down. */
.chopin-toggle .cp-wave { opacity: 0.2; transition: opacity 0.4s ease; }

/* Playing: waves bright and breathing gently. */
.chopin-toggle.is-playing .cp-wave { opacity: 1; animation: chopin-wave 2.4s ease-in-out infinite; }
.chopin-toggle.is-playing .cp-wave-2 { animation-delay: 0.4s; }
@keyframes chopin-wave {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
	.chopin-toggle.is-playing .cp-wave { animation: none; }
}

/* Song name + hint, shown below the icon on hover/focus and briefly on skip. */
.chopin-tip {
	position: absolute;
	top: calc(100% + 10px);
	right: -8px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 230px;
	max-width: 280px;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	color: #2b2b2b;
	font-size: 13px;
	line-height: 1.35;
	letter-spacing: 0.02em;
	text-align: right;
	text-transform: none;
	white-space: normal;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.chopin-tip:empty { display: none; }
.chopin-tip-title { font-style: italic; }
.chopin-tip-vol { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 11px; font-variant-numeric: tabular-nums; }
.chopin-tip-vol > span:last-child { min-width: 32px; }
.chopin-tip-vol-bar { position: relative; width: 90px; height: 3px; background: rgba(127, 127, 127, 0.3); border-radius: 2px; overflow: hidden; }
.chopin-tip-vol-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: currentColor; transition: width 0.15s ease; }
.chopin-tip-hint { font-size: 11px; opacity: 0.6; letter-spacing: 0.04em; }

.chopin-toggle:hover .chopin-tip,
.chopin-toggle:focus-visible .chopin-tip,
.chopin-toggle.show-tip .chopin-tip {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}
/* The tooltip is not hidden when the button fades on hover. */
.chopin-toggle:hover { opacity: 1; }
.chopin-toggle:hover svg { opacity: 0.65; }

html[data-theme="dark"] .chopin-tip {
	background: var(--dm-surface-2, #2a2825);
	border-color: var(--dm-border, rgba(255, 255, 255, 0.12));
	color: var(--dm-text, #dedad1);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

@media (hover: none) {
	.chopin-toggle:hover .chopin-tip { opacity: 0; visibility: hidden; }
	.chopin-toggle.show-tip .chopin-tip { opacity: 1; visibility: visible; }
}

@media only screen and (max-width: 1023px) {
	.chopin-hide-mobile { display: none !important; }
}
