/* NNP Text-to-Speech – front-end grotuvas */

.nnp-audio-player {
	--nnp-ap-primary: #c2185b;
	--nnp-ap-bg: #f7f7f8;
	--nnp-ap-text: #1d1d1f;
	--nnp-ap-radius: 14px;
	--nnp-ap-font: inherit;

	box-sizing: border-box;
	font-family: var(--nnp-ap-font);
	color: var(--nnp-ap-text);
	background: var(--nnp-ap-bg);
	border-radius: var(--nnp-ap-radius);
	padding: 14px 18px;
	margin: 0 0 1.5em;
	max-width: 100%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nnp-audio-player *,
.nnp-audio-player *::before,
.nnp-audio-player *::after {
	box-sizing: inherit;
}

.nnp-audio-player audio {
	display: none;
}

/* Antraštė */
.nnp-ap-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.nnp-ap-header .nnp-ap-icon {
	color: var(--nnp-ap-primary);
	flex: 0 0 auto;
}

.nnp-ap-duration {
	margin-left: auto;
	font-weight: 400;
	opacity: 0.65;
	text-transform: none;
	font-variant-numeric: tabular-nums;
}

/* Valdikliai */
.nnp-ap-controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nnp-audio-player button {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: var(--nnp-ap-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.nnp-ap-play {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--nnp-ap-primary) !important;
	color: #fff !important;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.nnp-ap-play:hover,
.nnp-ap-play:focus-visible {
	transform: scale(1.06);
	opacity: 0.92;
}

.nnp-audio-player .nnp-ap-icon-pause {
	display: none;
}

.nnp-audio-player.is-playing .nnp-ap-icon-pause {
	display: block;
}

.nnp-audio-player.is-playing .nnp-ap-icon-play {
	display: none;
}

/* Progreso juosta */
.nnp-ap-timeline {
	position: relative;
	flex: 1 1 auto;
	height: 6px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.12);
	cursor: pointer;
	touch-action: none;
	outline-offset: 6px;
}

.nnp-ap-progress {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	border-radius: inherit;
	background: var(--nnp-ap-primary);
}

.nnp-ap-handle {
	position: absolute;
	top: 50%;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--nnp-ap-primary);
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.15s ease;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.nnp-ap-timeline:hover .nnp-ap-handle,
.nnp-ap-timeline:focus-visible .nnp-ap-handle,
.nnp-audio-player.is-seeking .nnp-ap-handle {
	transform: translate(-50%, -50%) scale(1);
}

/* Laikas */
.nnp-ap-time {
	flex: 0 0 auto;
	font-size: 0.82rem;
	font-variant-numeric: tabular-nums;
	opacity: 0.8;
	min-width: 76px;
	text-align: center;
}

/* Greitis */
.nnp-ap-speed {
	flex: 0 0 auto;
	font-size: 0.8rem;
	font-weight: 700;
	min-width: 44px;
	height: 28px;
	border-radius: 14px;
	border: 1px solid rgba(0, 0, 0, 0.15) !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.nnp-ap-speed:hover,
.nnp-ap-speed:focus-visible {
	background: var(--nnp-ap-primary) !important;
	border-color: var(--nnp-ap-primary) !important;
	color: #fff !important;
}

/* Garsumas */
.nnp-ap-volume {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
}

.nnp-ap-mute {
	opacity: 0.8;
}

.nnp-ap-mute:hover {
	opacity: 1;
}

.nnp-audio-player .nnp-ap-icon-muted {
	display: none;
}

.nnp-audio-player.is-muted .nnp-ap-icon-muted {
	display: block;
}

.nnp-audio-player.is-muted .nnp-ap-icon-vol {
	display: none;
}

.nnp-ap-volume-slider {
	appearance: none;
	-webkit-appearance: none;
	width: 72px;
	height: 4px;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.15);
	outline-offset: 4px;
	cursor: pointer;
}

.nnp-ap-volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--nnp-ap-primary);
	border: 0;
}

.nnp-ap-volume-slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--nnp-ap-primary);
	border: 0;
}

/* Mobilus vaizdas */
@media (max-width: 600px) {
	.nnp-audio-player {
		padding: 12px 14px;
	}

	.nnp-ap-volume-slider {
		display: none; /* Mobiliuose garsumas valdomas įrenginio mygtukais. */
	}

	.nnp-ap-time {
		min-width: 0;
		font-size: 0.75rem;
	}

	.nnp-ap-controls {
		gap: 8px;
	}
}
