/* WT Smart TTS - full-width collapsible player */
.wt-tts {
	margin: 1.5em 0;
	padding: 0;
	width: 100%;
}

.wt-tts-controls {
	width: 100%;
	max-width: none;
}

.wt-tts-unsupported .wt-tts-message,
.wt-tts-error {
	color: #b32d2e;
	font-size: 0.95em;
}

.wt-tts-error.is-info {
	color: #1d2327;
}

.wt-tts-shell,
.wt-tts-player-card {
	width: 100%;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.wt-tts-shell {
	overflow: hidden;
}

.wt-tts-shell-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.8em 1em;
}

.wt-tts-shell-meta {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 0.9em;
}

.wt-tts-shell-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25em 0.9em;
}

.wt-tts-shell-actions {
	display: flex;
	align-items: center;
	gap: 0.55em;
	flex-shrink: 0;
}

.wt-tts-shell-toggle {
	padding: 0.3em 0.1em;
	border: 0;
	background: transparent;
	color: #2271b1;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.84em;
}

.wt-tts-shell-toggle:hover {
	color: #135e96;
}

.wt-tts-player-body {
	border-top: 1px solid #dcdcde;
	padding: 0 1em 0.95em;
}

.wt-tts-player-body[hidden] {
	display: none;
}

.wt-tts-player-card {
	box-shadow: none;
	padding: 0.7em 0 0;
}

.wt-tts-player-title {
	margin: 0;
	font-size: 1em;
	font-weight: 700;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 0.35em;
}

.wt-tts-chapter-label {
	margin: 0;
	font-size: 0.88em;
	font-weight: 600;
	color: #2271b1;
}

.wt-tts-time,
.wt-tts-free-today {
	font-size: 0.86em;
	color: #50575e;
}

.wt-tts-icon {
	display: inline-block;
	width: 1.05em;
	height: 1.05em;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0.7;
}

.wt-tts-icon-headphones {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E");
}

.wt-tts-icon-voice {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cpath d='M12 19v4'/%3E%3Cpath d='M8 23h8'/%3E%3C/svg%3E");
}

.wt-tts-icon-speed {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E");
}

.wt-tts-player-main {
	margin-bottom: 0.6em;
}

.wt-tts-play-row {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 0.35em;
}

.wt-tts-btn {
	padding: 0.42em 0.8em;
	font-size: 0.86em;
	cursor: pointer;
	border: 1px solid #ccc;
	background: #f5f5f5;
	border-radius: 7px;
}

.wt-tts-btn:hover {
	background: #eee;
	border-color: #999;
}

.wt-tts-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.wt-tts-btn-play {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
	padding: 0.45em 0.95em;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

#wt-tts-play.wt-tts-btn-play::before {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent #fff;
	flex-shrink: 0;
}

.wt-tts-btn-secondary {
	background: #f0f0f1;
	border-color: #c3c4c7;
	color: #1d2327;
}

.wt-tts-btn-secondary:hover {
	background: #e0e0e0;
}

.wt-tts-btn-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.wt-tts-btn-primary:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.wt-tts-progress {
	width: 100%;
	margin-top: 0.5em;
}

.wt-tts-progress-track {
	height: 6px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
}

.wt-tts-progress-bar {
	height: 100%;
	width: 0%;
	background: #2271b1;
	border-radius: 3px;
	transition: width 0.2s ease;
}

.wt-tts-player-options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.7em;
}

.wt-tts-option-group {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

.wt-tts-option-label {
	display: flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.8em;
	font-weight: 500;
	color: #1d2327;
	cursor: pointer;
}

.wt-tts-select {
	padding: 0.38em 0.55em;
	font-size: 0.84em;
	min-width: 0;
	width: 100%;
	border: 1px solid #c3c4c7;
	border-radius: 7px;
	background: #fff;
	appearance: auto;
}

.wt-tts-label {
	font-size: 0.9em;
	margin-right: 0.25em;
}

.wt-tts-guest-cta,
.wt-tts-error,
.wt-tts-premium-card {
	margin-top: 0.65em;
}

.wt-tts-guest-cta .wt-tts-message {
	margin-bottom: 0.5em;
}

.wt-tts-guest-cta .wt-tts-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0;
}

.wt-tts-guest-cta .wt-tts-links a {
	display: inline-block;
	text-decoration: none;
}

.wt-tts-premium-card {
	width: 100%;
	max-width: none;
	padding: 0.8em 1em;
	background: #f8f9fa;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wt-tts-premium-card.is-confirm {
	border: 1px solid #c6e1ff;
	background: #f5faff;
}

.wt-tts-premium-card.is-purchase {
	border: 1px solid #dcdcde;
}

.wt-tts-premium-card-title {
	margin: 0 0 0.35em;
	font-size: 0.98em;
	font-weight: 600;
}

.wt-tts-premium-free,
.wt-tts-premium-countdown,
.wt-tts-premium-cost,
.wt-tts-premium-confirm,
.wt-tts-premium-balance-line {
	margin: 0;
	font-size: 0.86em;
}

.wt-tts-premium-balance-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3em 0.5em;
	color: #1d2327;
}

.wt-tts-premium-balance-label {
	color: #50575e;
}

.wt-tts-premium-balance-value {
	font-weight: 600;
}

.wt-tts-premium-consent {
	margin: 0.15em 0 0;
	font-size: 0.82em;
}

.wt-tts-premium-consent label {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.55em;
	cursor: pointer;
}

.wt-tts-premium-consent input {
	margin-top: 0.2em;
}

.wt-tts-premium-card .wt-tts-btn-primary {
	margin-top: 0.15em;
}

.wt-tts-premium-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.35em;
	padding: 0.38em 0.7em;
	font-size: 0.82em;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 7px;
	color: #1d2327;
	cursor: pointer;
	text-decoration: none;
}

.wt-tts-premium-toggle:hover {
	background: #e0e0e0;
	color: #1d2327;
}

.wt-tts-premium-buy-content {
	margin-top: 0.45em;
}

.wt-tts-premium-buy-content > * {
	margin-bottom: 0.5em;
}

.wt-tts-immersive-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.wt-tts-immersive-overlay[aria-hidden="false"] {
	opacity: 1;
}

.wt-tts-immersive-player {
	max-width: 90vw;
	width: 420px;
	padding: 1.5em;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.wt-tts-immersive-title {
	margin: 0 0 0.5em;
	font-size: 1.1em;
	font-weight: 600;
}

.wt-tts-immersive-time {
	margin: 0 0 0.5em;
	font-size: 0.95em;
	color: #50575e;
}

.wt-tts-immersive-progress {
	height: 8px;
	margin: 0.5em 0 1em;
	background: #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.wt-tts-immersive-progress-bar {
	height: 100%;
	width: 0%;
	background: #2271b1;
	border-radius: 4px;
	transition: width 0.2s ease;
}

.wt-tts-immersive-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0.75em;
}

.wt-tts-immersive-controls .wt-tts-select {
	min-width: 100px;
}

.wt-tts-mini-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.5em 0.75em;
	background: #fff;
	border-top: 1px solid #ddd;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
	min-height: 48px;
}

.wt-tts-mini-bar-progress {
	flex: 1;
	height: 4px;
	min-width: 60px;
	background: #e0e0e0;
	border-radius: 2px;
	overflow: hidden;
}

.wt-tts-mini-bar-progress-inner {
	height: 100%;
	width: 0%;
	background: #2271b1;
	border-radius: 2px;
	transition: width 0.2s ease;
}

.wt-tts-mini-bar-btn {
	padding: 0.4em 0.6em;
	font-size: 0.9em;
	cursor: pointer;
	border: 1px solid #ccc;
	background: #f5f5f5;
	border-radius: 3px;
	min-width: 44px;
	min-height: 44px;
}

.wt-tts-mini-bar-btn:hover {
	background: #eee;
}

.wt-tts-mini-bar-time {
	font-size: 0.85em;
	color: #50575e;
	min-width: 3em;
}

@media (max-width: 768px) {
	.wt-tts-shell-summary {
		align-items: flex-start;
		flex-direction: column;
		padding: 0.75em 0.9em;
	}

	.wt-tts-shell-actions {
		width: 100%;
		justify-content: flex-start;
	}
}

@media (max-width: 480px) {
	.wt-tts-shell-summary,
	.wt-tts-player-body,
	.wt-tts-premium-card {
		padding-left: 0.8em;
		padding-right: 0.8em;
	}

	.wt-tts-player-options {
		grid-template-columns: 1fr;
	}

	.wt-tts-immersive-player {
		width: 95vw;
		padding: 1em;
	}

	.wt-tts-mini-bar {
		padding: 0.5em;
	}
}
