/*
 * «Послушать» in the collections of expressions (includes/Terms.php, assets/js/terms.js): the speaker button after
 * an expression, the words to tap in a row of synonyms, the hint above them. A small file of its own: these articles
 * do not always load academy.css.
 *
 * The theme styles every button (Kadence: button:hover/:focus/:active { color: #fff; background: … }, 0,1,1), so the
 * button is selected as «html body button.kga-say» and its states are set here explicitly.
 */
html body button.kga-say {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 28px;
	height: 28px;
	min-height: 0;
	margin: -3px 0 0 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #e6ebee;
	box-shadow: none;
	color: var(--kg-navy, #172838);
	font-size: 0;
	line-height: 1;
	vertical-align: middle;
	cursor: pointer;
	transition: background-color .15s, color .15s, transform .15s;
}
html body button.kga-say::before,
.kga-say-note .kga-say-icon::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9.5v5h3.6l5.4 4.3V5.2L6.6 9.5H3z'/%3E%3Cpath d='M15.4 8.6a4.8 4.8 0 0 1 0 6.8M18 5.8a8.7 8.7 0 0 1 0 12.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9.5v5h3.6l5.4 4.3V5.2L6.6 9.5H3z'/%3E%3Cpath d='M15.4 8.6a4.8 4.8 0 0 1 0 6.8M18 5.8a8.7 8.7 0 0 1 0 12.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body button.kga-say:hover,
html body button.kga-say:focus,
html body button.kga-say:active {
	border: 0;
	background: var(--kg-navy, #172838);
	box-shadow: none;
	color: #fff;
}
html body button.kga-say:focus-visible { outline: 3px solid var(--kg-copper, #b97c60); outline-offset: 2px; }
html body button.kga-say:active { transform: scale(.92); }
html body button.kga-say.is-playing,
html body button.kga-say.is-playing:hover,
html body button.kga-say.is-playing:focus { background: var(--kg-copper, #b97c60); color: #fff; }

/* A word of a row of synonyms: tap to hear it. */
.kga-say-word {
	border-radius: 4px;
	text-decoration: underline dotted var(--kg-copper, #b97c60);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .15s;
}
.kga-say-word:hover { background: rgba(185, 124, 96, .16); }
.kga-say-word.is-playing { background: rgba(185, 124, 96, .3); }

.kga-say-note {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	padding: 10px 14px;
	border-radius: var(--kg-radius-sm, 8px);
	background: var(--kg-cream, #f7f5f0);
	color: var(--kg-text, #33404a);
	font-size: 14.5px;
	line-height: 1.45;
}
h1 + .kga-say-note { margin-top: 16px; }
.kga-say-note .kga-say-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e6ebee;
	color: var(--kg-navy, #172838);
}

/* No voice in the browser: what has no recording is plain text again; with no recordings at all, everything is. */
.kga-no-voice .kga-say,
.kga-no-voice .kga-say-note,
.kga-no-synth .kga-say:not([data-a]) { display: none !important; }
.kga-no-voice .kga-say-word,
.kga-no-synth .kga-say-word:not([data-a]) { text-decoration: none; cursor: auto; background: none; }

@media (max-width: 600px) {
	html body button.kga-say { width: 32px; height: 32px; margin-left: 6px; }
	.kga-say-note { align-items: flex-start; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	html body button.kga-say, .kga-say-word { transition: none; }
	html body button.kga-say:active { transform: none; }
}
@media print {
	html body button.kga-say, .kga-say-note { display: none; }
	.kga-say-word { text-decoration: none; }
}
