.radio-ai,
.radio-ai *,
.radio-ai *::before,
.radio-ai *::after {
	box-sizing: border-box;
}

.radio-ai {
	max-width: 100vw;
}

body.radio-wave-pwa-prompt-open .radio-ai-launcher {
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px);
}

.radio-ai__header {
	grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.radio-ai__header > div:nth-child(2) {
	min-width: 0;
}

.radio-ai__modes {
	display: inline-flex;
	grid-column: 1 / -1;
	width: 100%;
	padding: 3px;
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.04);
}

.radio-ai__modes button {
	flex: 1;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #aeb1c2;
	font: 700 9px/1.1 inherit;
	white-space: nowrap;
	cursor: pointer;
}

.radio-ai__modes button[aria-pressed="true"] {
	background: #6f54f5;
	color: #fff;
	box-shadow: 0 4px 14px rgba(73, 59, 190, 0.34);
}

.radio-ai.is-radio-host .radio-ai__avatar {
	background: linear-gradient(135deg, #f45a8b, #7c55ff);
}

.radio-ai.is-radio-host .radio-ai__subtitle i {
	animation: radio-host-live 1.2s ease-in-out infinite alternate;
}

.radio-ai__outro {
	margin-top: 12px !important;
	color: #d9d3ff;
	font-weight: 600;
}

.radio-ai-card__reactions {
	display: flex;
	gap: 6px;
	grid-column: 1 / -1;
}

.radio-ai-card__reactions button {
	flex: 1;
}

.radio-ai-card__reactions button.is-active {
	border-color: #8d76ff;
	background: rgba(112, 82, 255, 0.18);
	color: #fff;
}

.radio-ai-card.is-rejected {
	opacity: 0.58;
}

.radio-ai__form {
	width: 100%;
	min-width: 0;
	grid-template-columns: minmax(0, 1fr) 42px;
}

.radio-ai__form textarea {
	width: 100%;
	min-width: 0;
}

.radio-ai__form button {
	min-width: 42px;
}

@keyframes radio-host-live {
	to {
		opacity: 0.45;
		box-shadow: 0 0 16px #ff6099;
	}
}

@media (max-width: 680px) {
	.radio-ai {
		bottom: max(0px, env(safe-area-inset-bottom));
		height: min(82dvh, 760px);
	}

	.radio-ai__header {
		position: sticky;
		top: 0;
		z-index: 2;
		grid-template-columns: auto minmax(0, 1fr) auto auto;
		padding-top: max(12px, env(safe-area-inset-top));
	}

	.radio-ai__modes button[data-ai-chat-mode="normal"] {
		display: none;
	}

	.radio-ai__modes button {
		padding: 7px 9px;
	}

	.radio-ai__host-label {
		font-size: 0;
	}

	.radio-ai__host-label::after {
		content: "Ведущий";
		font-size: 9px;
	}

	.radio-ai__form {
		padding-bottom: max(14px, env(safe-area-inset-bottom));
	}

	body.player-open .radio-ai {
		bottom: calc(88px + env(safe-area-inset-bottom));
		height: min(calc(82dvh - 88px), 672px);
	}
}
