/* Аудио-редактор, модуль «Студия»: обработка, дорожки, распознавание речи */

.als {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 16px;
}

.als-card .alc-card-head {
	align-items: flex-start;
}

.als-target {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 240px;
	margin: 0;
}

.als-target > span {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--alc-muted);
}

.alc-app .als-target select,
.alc-app .als-lane-fields input,
.alc-app .als-range-row input {
	height: 38px;
	padding: 0 10px;
	margin: 0;
	border-radius: 10px;
	border: 1px solid var(--alc-line-2);
	background-color: rgba(0, 0, 0, .2);
	color: var(--alc-text);
	font: 600 13px/1.2 inherit;
	font-family: inherit;
	box-shadow: none;
}

html[data-theme="light"] .alc-app .als-target select,
html[data-theme="light"] .alc-app .als-lane-fields input,
html[data-theme="light"] .alc-app .als-range-row input {
	background-color: #fff;
}

.als-target em {
	font-style: normal;
	font: 600 11.5px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--alc-amber);
}

/* Вкладки */
.als-tabs {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: rgba(0, 0, 0, .2);
	border: 1px solid var(--alc-line);
}

html[data-theme="light"] .als-tabs {
	background: rgba(15, 23, 42, .05);
}

.alc-app .als-tabs button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--alc-muted);
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.alc-app .als-tabs button:hover {
	color: var(--alc-text);
}

.alc-app .als-tabs button.is-active {
	color: var(--alc-amber-ink);
	background: linear-gradient(180deg, var(--alc-amber-2), var(--alc-amber));
}

.als-row {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.als-row .alc-field {
	margin: 0;
}

.als-grow {
	flex: 1 1 240px;
}

/* Эквалайзер */
.als-bands {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	gap: 6px;
	padding: 14px 10px 10px;
	border-radius: 12px;
	border: 1px solid var(--alc-line);
	background: rgba(0, 0, 0, .18);
}

html[data-theme="light"] .als-bands {
	background: rgba(15, 23, 42, .03);
}

.als-band {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.als-band output {
	font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--alc-amber);
	min-height: 12px;
}

.als-band span {
	font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--alc-muted);
}

.alc-app .als-band input[type="range"] {
	writing-mode: vertical-lr;
	direction: rtl;
	width: 6px;
	height: 140px;
	margin: 0;
	background: var(--alc-line-2);
	border-radius: 99px;
	-webkit-appearance: slider-vertical;
	appearance: auto;
	accent-color: var(--alc-amber);
}

@supports (writing-mode: vertical-lr) {
	.alc-app .als-band input[type="range"] {
		-webkit-appearance: none;
		appearance: none;
	}
}

.als-note {
	margin-top: 10px !important;
	font-size: 12px;
	color: var(--alc-muted);
}

.als-privacy {
	color: var(--alc-amber);
}

.alc-app input.als-range {
	width: 100%;
	margin: 10px 0;
}

.als-grid3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	align-items: end;
	margin-bottom: 8px;
}

.als-grid3 .alc-field input,
.als-grid3 .alc-field select {
	width: 100%;
}

.als-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	color: var(--alc-muted);
	cursor: pointer;
}

.als-check input {
	width: 16px;
	height: 16px;
	accent-color: var(--alc-amber);
}

/* Улучшение */
.als-enhs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.als-enh {
	position: relative;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid var(--alc-line);
	background: rgba(0, 0, 0, .14);
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

html[data-theme="light"] .als-enh {
	background: rgba(15, 23, 42, .03);
}

.als-enh input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.als-enh-ui {
	position: relative;
	width: 34px;
	height: 20px;
	border-radius: 99px;
	background: var(--alc-line-2);
	flex: none;
	margin-top: 1px;
	transition: background .15s;
}

.als-enh-ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}

.als-enh input:checked + .als-enh-ui {
	background: var(--alc-green);
}

.als-enh input:checked + .als-enh-ui::after {
	transform: translateX(14px);
}

.als-enh:has(input:checked) {
	border-color: rgba(52, 211, 153, .4);
	background: var(--alc-green-soft);
}

.als-enh input:focus-visible + .als-enh-ui {
	outline: 2px solid var(--alc-amber);
	outline-offset: 2px;
}

.als-enh-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.als-enh-text b {
	font-size: 13.5px;
	font-weight: 800;
}

.als-enh-text small {
	font-size: 12px;
	color: var(--alc-muted);
}

.als-gatefield {
	margin-top: 12px;
}

.als-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.als-actions .alc-btn.is-playing {
	color: #fff;
	border-color: transparent;
	background: linear-gradient(180deg, #fb8a8a, #ef5b5b);
}

/* Дорожки */
.als-lanes {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.als-lane {
	padding: 12px;
	border-radius: 12px;
	border: 1px solid var(--alc-line);
	background: rgba(0, 0, 0, .16);
}

html[data-theme="light"] .als-lane {
	background: rgba(15, 23, 42, .03);
}

.als-lane.is-muted {
	opacity: .55;
}

.als-lane-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.als-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: none;
}

.als-name {
	flex: 1;
	min-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
}

.als-vol {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--alc-muted);
}

.alc-app .als-vol input {
	width: 120px;
}

.als-vol output {
	min-width: 40px;
	font: 700 11.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--alc-text);
}

.als-lane-head .alc-icon-btn.is-on {
	color: var(--alc-red);
	border-color: rgba(248, 113, 113, .5);
}

.als-lane-canvas {
	display: block;
	width: 100%;
	height: 56px;
	border-radius: 8px;
	background: rgba(0, 0, 0, .25);
	cursor: grab;
	touch-action: none;
}

html[data-theme="light"] .als-lane-canvas {
	background: rgba(15, 23, 42, .05);
}

.als-lane:first-child .als-lane-canvas {
	cursor: default;
}

.als-lane-canvas.is-dragging {
	cursor: grabbing;
}

.als-lane-fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	gap: 10px;
	align-items: end;
	margin-top: 10px;
}

.als-lane-fields .alc-field {
	margin: 0;
}

.alc-app .als-lane-fields input {
	width: 100%;
}

.als-ranges:not(:empty) {
	margin-top: 8px;
}

.als-range-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 6px 0;
	font-size: 12.5px;
	color: var(--alc-muted);
}

.als-range-row > span {
	font-weight: 700;
	color: var(--alc-text);
}

.als-range-row label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.alc-app .als-range-row input {
	width: 80px;
	height: 32px;
}

/* Распознавание */
.als-banner {
	padding: 10px 12px;
	margin-bottom: 12px;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--alc-amber);
	background: var(--alc-amber-soft);
	border: 1px solid rgba(132, 90, 223, .3);
}

.als-stt-progress {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	font-size: 12.5px;
	font-weight: 700;
}

.als-stt-progress .alc-bar {
	flex: 1;
}

.als-interim {
	min-height: 18px;
	margin: 10px 0 6px !important;
	font-size: 13px;
	font-style: italic;
	color: var(--alc-muted);
}

.alc-app .als-text {
	width: 100%;
	min-height: 160px;
	padding: 12px 14px;
	margin: 0;
	border-radius: 12px;
	border: 1px solid var(--alc-line-2);
	background: rgba(0, 0, 0, .2);
	color: var(--alc-text);
	font: 500 14px/1.6 inherit;
	font-family: inherit;
	resize: vertical;
}

html[data-theme="light"] .alc-app .als-text {
	background: #fff;
}

@media (max-width: 900px) {
	.als-enhs,
	.als-grid3,
	.als-lane-fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.als-bands {
		gap: 2px;
		padding: 10px 4px;
	}

	.alc-app .als-band input[type="range"] {
		height: 110px;
	}
}
