/* Yoga Audio Reader – player */
.yar-player {
	--yar-primary: #d87a61;
	--yar-secondary: #a6c5ab;
	--yar-bg: #f5e7e1;
	--yar-text: #3b2b25;

	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	max-width: 100%;
	margin: 0 0 24px;
	padding: 14px 18px 14px 14px;
	background: var(--yar-bg);
	border: 1px solid rgba(216, 122, 97, .25);
	border-left: 4px solid var(--yar-primary);
	border-radius: 14px;
	box-sizing: border-box;
	font-family: "Open Sans", Sans-serif;
	color: var(--yar-text);
	line-height: 1.3;
}
.yar-player *,
.yar-player *::before,
.yar-player *::after { box-sizing: border-box; }

/* Play / pause */
.yar-player .yar-play {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--yar-primary);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(216, 122, 97, .35);
	transition: transform .2s ease, box-shadow .2s ease;
	position: relative;
}
.yar-player .yar-play:hover { transform: scale(1.06); }
.yar-player .yar-play:focus-visible { outline: 3px solid var(--yar-secondary); outline-offset: 3px; }
.yar-player .yar-play svg { width: 22px; height: 22px; fill: #fff; }
.yar-player .yar-ico-pause { display: none; }
.yar-player.is-playing .yar-ico-play { display: none; }
.yar-player.is-playing .yar-ico-pause { display: block; }
.yar-player.is-playing .yar-play::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--yar-primary);
	opacity: .5;
	animation: yar-pulse 1.6s ease-out infinite;
}

/* Middle */
.yar-player .yar-main { flex: 1 1 auto; min-width: 0; position: relative; }
.yar-player .yar-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 9px;
}
.yar-player .yar-label {
	font-family: "Afacad", Sans-serif;
	font-size: 18px;
	font-weight: 600;
	color: var(--yar-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.yar-player .yar-time {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .3px;
	color: var(--yar-primary);
}
.yar-player .yar-bar {
	position: relative;
	height: 6px;
	border-radius: 10px;
	background: rgba(166, 197, 171, .45);
	cursor: pointer;
	overflow: hidden;
}
.yar-player .yar-bar:focus-visible { outline: 2px solid var(--yar-primary); outline-offset: 3px; }
.yar-player .yar-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 10px;
	background: var(--yar-primary);
	transition: width .4s ease;
}

/* Sound wave (shows while playing) */
.yar-player .yar-wave {
	position: absolute;
	right: 0;
	top: -2px;
	display: none;
	gap: 2px;
	height: 14px;
	align-items: flex-end;
}
.yar-player .yar-wave i {
	display: block;
	width: 3px;
	background: var(--yar-secondary);
	border-radius: 2px;
	animation: yar-wave 1s ease-in-out infinite;
}
.yar-player .yar-wave i:nth-child(2) { animation-delay: .15s; }
.yar-player .yar-wave i:nth-child(3) { animation-delay: .3s; }
.yar-player .yar-wave i:nth-child(4) { animation-delay: .45s; }
.yar-player .yar-wave i:nth-child(5) { animation-delay: .6s; }
.yar-player.is-playing .yar-wave { display: flex; }
.yar-player.is-playing .yar-time { margin-right: 26px; }

/* Right controls */
.yar-player .yar-controls {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
}
.yar-player .yar-stop,
.yar-player .yar-speed,
.yar-player .yar-voice {
	height: 36px;
	margin: 0;
	border: 1px solid rgba(59, 43, 37, .12);
	border-radius: 50px;
	background: #fff;
	color: var(--yar-text);
	font-family: "Open Sans", Sans-serif;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
	box-shadow: none;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1;
}
.yar-player .yar-stop {
	width: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.yar-player .yar-stop svg { width: 13px; height: 13px; fill: currentColor; }
.yar-player .yar-speed { min-width: 52px; padding: 0 12px; }
.yar-player .yar-voice { max-width: 170px; padding: 0 12px; font-weight: 600; }
.yar-player .yar-stop:hover,
.yar-player .yar-speed:hover {
	background: var(--yar-secondary);
	border-color: var(--yar-secondary);
	color: var(--yar-text);
}

/* Unsupported browser */
.yar-player.yar-unsupported { opacity: .7; }
.yar-player.yar-unsupported .yar-play { cursor: not-allowed; box-shadow: none; }
.yar-player.yar-unsupported .yar-controls,
.yar-player.yar-unsupported .yar-bar { display: none; }

/* Animations */
@keyframes yar-pulse {
	0% { transform: scale(.9); opacity: .6; }
	100% { transform: scale(1.3); opacity: 0; }
}
@keyframes yar-wave {
	0%, 100% { height: 4px; }
	50% { height: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.yar-player .yar-play::after,
	.yar-player .yar-wave i { animation: none !important; }
}

/* Mobile */
@media (max-width: 600px) {
	.yar-player {
		flex-wrap: wrap;
		gap: 12px;
		padding: 12px;
	}
	.yar-player .yar-play { width: 46px; height: 46px; }
	.yar-player .yar-play svg { width: 19px; height: 19px; }
	.yar-player .yar-main { flex: 1 1 calc(100% - 60px); }
	.yar-player .yar-label { font-size: 16px; }
	.yar-player .yar-controls {
		flex: 1 1 100%;
		justify-content: flex-end;
	}
	.yar-player .yar-voice { flex: 1 1 auto; max-width: none; }
}
