/* Read Aloud (Web Speech) — player styles
   Neutral defaults that inherit the theme's fonts; override freely. */

.ratts-player {
	margin: 1.5em 0;
	padding: 14px 16px;
	border: 1px solid rgba( 0, 0, 0, 0.1 );
	border-radius: 10px;
	background: rgba( 0, 0, 0, 0.02 );
	font-size: 15px;
	line-height: 1.4;
}

.ratts-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ratts-row + .ratts-row {
	margin-top: 12px;
}

.ratts-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 0;
	border-radius: 8px;
	background: #1a1a1a;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ratts-btn:hover {
	opacity: 0.88;
}

.ratts-stop {
	background: transparent;
	color: #1a1a1a;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
	padding: 8px 12px;
	font-weight: 400;
}

.ratts-icon-play {
	font-size: 0.85em;
	line-height: 1;
}

/* Controls row */
.ratts-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}

.ratts-field span {
	opacity: 0.7;
}

.ratts-field em {
	font-style: normal;
	font-weight: 600;
	opacity: 1;
}

.ratts-field select,
.ratts-field input[type="range"] {
	font: inherit;
	max-width: 220px;
}

/* Progress */
.ratts-progress {
	margin-top: 12px;
	height: 4px;
	border-radius: 4px;
	background: rgba( 0, 0, 0, 0.1 );
	overflow: hidden;
}

.ratts-progress-bar {
	height: 100%;
	width: 0;
	background: #1a1a1a;
	transition: width 0.25s ease;
}

/* Currently-read block highlight */
.ratts-reading {
	background: rgba( 255, 222, 89, 0.35 );
	border-radius: 3px;
	box-shadow: 0 0 0 4px rgba( 255, 222, 89, 0.35 );
	transition: background 0.2s ease;
}

/* Dark themes: respect prefers-color-scheme */
@media ( prefers-color-scheme: dark ) {
	.ratts-player {
		border-color: rgba( 255, 255, 255, 0.15 );
		background: rgba( 255, 255, 255, 0.04 );
	}
	.ratts-btn {
		background: #f5f5f5;
		color: #111;
	}
	.ratts-stop {
		color: #f5f5f5;
		border-color: rgba( 255, 255, 255, 0.3 );
	}
	.ratts-progress { background: rgba( 255, 255, 255, 0.15 ); }
	.ratts-progress-bar { background: #f5f5f5; }
}
