.avance-tts {
	margin: 0 0 2rem;
	padding: 20px;
	border: 1px solid #000;
	background: #ECE8DF;
}

.avance-tts__title {
	margin-bottom: 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

.avance-tts__player {
	display: flex;
	align-items: center;
	gap: 1rem;
}


/*
 * Play / Pause
 */

.avance-tts__toggle {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;

	width: 44px;
	height: 44px;

	padding: 0;

	border: 0;
	border-radius: 50%;

	background: #000;
	color: #fff;

	cursor: pointer;

	transition:
		background-color 0.2s ease,
		transform 0.2s ease;
}

.avance-tts__toggle:hover {
	transform: scale(1.05);
}

.avance-tts__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.avance-tts__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}


/*
 * Timeline
 */

.avance-tts__timeline {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 0.75rem;

	min-width: 0;
}

.avance-tts__progress {
	position: relative;

	flex: 1;

	height: 6px;

	overflow: hidden;

	border-radius: 999px;

	background: #ddd;
}

.avance-tts__progress-bar {
	position: absolute;
	top: 0;
	left: 0;

	width: 0;
	height: 100%;

	border-radius: inherit;

	background: #000;

	transition: width 0.25s linear;
}


/*
 * Timing
 */

.avance-tts__time {
	display: flex;
	flex: 0 0 auto;
	gap: 0.3em;

	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;

	white-space: nowrap;
}

.avance-tts__time-separator {
	opacity: 0.5;
}


/*
 * Playback speed
 */

.avance-tts__rate {
	flex: 0 0 auto;
}

.avance-tts__rate select {
	padding: 0.35rem 0.5rem;

	border: 1px solid #ccc;
	border-radius: 4px;

	background: transparent;

	font: inherit;
	font-size: 0.85rem;

	cursor: pointer;
	margin: 0;
}


/*
 * Mobile
 */

@media (max-width: 600px) {

	.avance-tts__player {
		flex-wrap: wrap;
	}

	.avance-tts__timeline {
		flex: 1 1 calc(100% - 60px);
	}

	.avance-tts__rate {
		margin-left: 60px;
	}
}