/**
 * Estúdio de vídeo — front-end da Agência Triagem.
 */

.agt-chat .agt-video {
	margin-top: 1.4rem;
	padding: clamp(1rem, 2.4vw, 1.6rem);
	border: 1px solid var(--agt-line);
	border-radius: var(--agt-radius-sm);
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(240, 172, 50, 0.08), transparent 52%),
		var(--agt-card-2);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
}

.agt-chat .agt-video-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.agt-chat .agt-video-kicker {
	margin: 0 0 0.2rem;
	color: var(--agt-amber-soft);
	font-family: var(--agt-font-display);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.agt-chat .agt-video-title {
	margin: 0;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: clamp(1.15rem, 2.6vw, 1.45rem);
	font-weight: 750;
	letter-spacing: -0.02em;
}

.agt-chat .agt-video-lead {
	margin: 0.35rem 0 0;
	max-width: 46ch;
	color: var(--agt-muted);
	font-size: 0.86rem;
	line-height: 1.55;
}

.agt-chat .agt-video-pill {
	flex: 0 0 auto;
	padding: 0.28rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: var(--agt-radius-pill);
	background: rgba(255, 250, 243, 0.04);
	color: var(--agt-muted);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.agt-chat .agt-video-pill.is-ready,
.agt-chat .agt-video-pill.is-rendered {
	border-color: rgba(72, 199, 142, 0.45);
	background: rgba(72, 199, 142, 0.12);
	color: #8ee7bd;
}

.agt-chat .agt-video-pill.is-analyzing,
.agt-chat .agt-video-pill.is-rendering {
	border-color: rgba(240, 172, 50, 0.45);
	background: rgba(240, 172, 50, 0.12);
	color: var(--agt-amber-soft);
}

.agt-chat .agt-video-pill.is-failed {
	border-color: rgba(255, 105, 120, 0.5);
	background: rgba(255, 105, 120, 0.12);
	color: #ff9aa6;
}

.agt-chat .agt-video-error {
	margin: 0 0 1rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid rgba(255, 105, 120, 0.45);
	border-radius: 0.7rem;
	background: rgba(255, 105, 120, 0.1);
	color: #ffc2c9;
	font-size: 0.82rem;
	line-height: 1.45;
}

.agt-chat .agt-video-block {
	padding: 1rem 0;
	border-top: 1px solid var(--agt-line);
}

.agt-chat .agt-video-block:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.agt-chat .agt-video-block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	margin-bottom: 0.65rem;
}

.agt-chat .agt-video-block-head h4 {
	margin: 0;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.agt-chat .agt-video-hint {
	color: var(--agt-muted);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.agt-chat .agt-video-copy {
	margin: 0 0 0.75rem;
	color: var(--agt-muted);
	font-size: 0.8rem;
	line-height: 1.55;
}

.agt-chat .agt-video-upload {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 0.9rem 1rem;
	border: 1px dashed var(--agt-line-strong);
	border-radius: 0.8rem;
	background: rgba(255, 250, 243, 0.025);
	color: var(--agt-ink);
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.agt-chat .agt-video-upload:hover,
.agt-chat .agt-video-upload:focus-within {
	border-color: var(--agt-brand);
	background: rgba(240, 172, 50, 0.07);
}

.agt-chat .agt-video-upload svg {
	flex: 0 0 auto;
	width: 1.55rem;
	height: 1.55rem;
	color: var(--agt-brand);
}

.agt-chat .agt-video-upload span {
	display: grid;
	gap: 0.1rem;
	min-width: 0;
}

.agt-chat .agt-video-upload strong {
	font-size: 0.84rem;
	font-weight: 650;
}

.agt-chat .agt-video-upload small {
	color: var(--agt-muted);
	font-size: 0.72rem;
	line-height: 1.4;
}

.agt-chat .agt-video-upload--small {
	padding: 0.7rem 0.85rem;
}

.agt-chat .agt-video-empty {
	margin: 0.65rem 0 0;
	color: var(--agt-muted);
	font-size: 0.78rem;
}

.agt-chat .agt-video-list {
	display: grid;
	gap: 0.55rem;
	margin: 0.8rem 0 0;
	padding: 0;
	list-style: none;
}

.agt-chat .agt-video-item {
	display: grid;
	grid-template-columns: 4.6rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.55rem;
	border: 1px solid var(--agt-line);
	border-radius: 0.7rem;
	background: rgba(10, 10, 12, 0.35);
}

.agt-chat .agt-video-item-media {
	display: grid;
	place-items: center;
	width: 4.6rem;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 0.5rem;
	background: rgba(255, 250, 243, 0.05);
	color: var(--agt-brand);
	font-size: 1.1rem;
}

.agt-chat .agt-video-item-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.agt-chat .agt-video-item-info {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}

.agt-chat .agt-video-item-info strong {
	overflow: hidden;
	color: var(--agt-ink);
	font-size: 0.8rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.agt-chat .agt-video-item-info small {
	color: var(--agt-muted);
	font-size: 0.7rem;
}

.agt-chat .agt-video-item-actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.agt-chat .agt-video-icon {
	display: inline-grid;
	place-items: center;
	width: 1.7rem;
	height: 1.7rem;
	padding: 0;
	border: 1px solid var(--agt-line);
	border-radius: 999px;
	background: transparent;
	color: var(--agt-muted);
	font-size: 0.88rem;
	line-height: 1;
	cursor: pointer;
}

.agt-chat .agt-video-icon:hover {
	border-color: var(--agt-line-strong);
	color: var(--agt-ink);
}

.agt-chat .agt-video-icon.is-danger:hover {
	border-color: rgba(255, 105, 120, 0.5);
	color: #ff9aa6;
}

.agt-chat .agt-video-closing:not(:empty) {
	margin-top: 0.65rem;
}

.agt-chat .agt-video-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: var(--agt-muted);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
}

.agt-chat .agt-video-switch input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--agt-brand);
}

.agt-chat .agt-video-refs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 0.7rem;
}

.agt-chat .agt-video-ref {
	position: relative;
	width: 5.2rem;
	height: 3.4rem;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--agt-line);
	border-radius: 0.55rem;
	background: rgba(10, 10, 12, 0.4);
}

.agt-chat .agt-video-ref img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.agt-chat .agt-video-ref .agt-video-icon {
	position: absolute;
	top: 0.2rem;
	right: 0.2rem;
	width: 1.35rem;
	height: 1.35rem;
	background: rgba(10, 10, 12, 0.78);
}

.agt-chat .agt-video-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.8rem;
}

.agt-chat .agt-video-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.35rem;
	padding: 0.5rem 0.95rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	background: rgba(255, 250, 243, 0.05);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.78rem;
	font-weight: 650;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.agt-chat .agt-video-btn:hover:not(:disabled) {
	border-color: var(--agt-brand);
	background: rgba(240, 172, 50, 0.12);
}

.agt-chat .agt-video-btn:disabled {
	opacity: 0.42;
	cursor: not-allowed;
}

.agt-chat .agt-video-btn--primary {
	border-color: var(--agt-brand);
	background: var(--agt-brand);
	color: var(--agt-amber-ink, #1a1204);
}

.agt-chat .agt-video-btn--primary:hover:not(:disabled) {
	background: var(--agt-amber-soft, #ffcf7d);
}

.agt-chat .agt-video-btn--ghost {
	border-color: var(--agt-line);
	background: transparent;
}

.agt-chat .agt-video-cues {
	display: grid;
	gap: 0.55rem;
	margin-top: 0.8rem;
}

.agt-chat .agt-video-cue {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem;
	border: 1px solid var(--agt-line);
	border-radius: 0.65rem;
	background: rgba(10, 10, 12, 0.28);
}

.agt-chat .agt-video-cue-text {
	grid-column: 1 / -1;
	width: 100%;
	min-height: 2.2rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--agt-line);
	border-radius: 0.45rem;
	background: rgba(255, 250, 243, 0.04);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.8rem;
}

.agt-chat .agt-video-cue-times {
	display: flex;
	gap: 0.4rem;
}

.agt-chat .agt-video-cue-time {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	color: var(--agt-muted);
	font-size: 0.65rem;
	white-space: nowrap;
}

.agt-chat .agt-video-cue-time input {
	width: 4.1rem;
	padding: 0.35rem 0.4rem;
	border: 1px solid var(--agt-line);
	border-radius: 0.4rem;
	background: rgba(255, 250, 243, 0.04);
	color: var(--agt-ink);
	font-size: 0.75rem;
}

.agt-chat .agt-video-cue-position {
	padding: 0.4rem 0.45rem;
	border: 1px solid var(--agt-line);
	border-radius: 0.4rem;
	background: rgba(255, 250, 243, 0.04);
	color: var(--agt-ink);
	font-size: 0.72rem;
}

.agt-chat .agt-video-cue-text:focus,
.agt-chat .agt-video-cue-time input:focus,
.agt-chat .agt-video-cue-position:focus {
	border-color: var(--agt-brand);
	outline: none;
}

.agt-chat .agt-video-warnings {
	margin-top: 0.75rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid rgba(240, 172, 50, 0.35);
	border-radius: 0.55rem;
	background: rgba(240, 172, 50, 0.08);
	color: var(--agt-amber-soft);
	font-size: 0.74rem;
	line-height: 1.5;
}

.agt-chat .agt-video-options {
	display: grid;
	gap: 0.55rem;
}

.agt-chat .agt-video-option {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--agt-line);
	border-radius: 0.65rem;
	background: rgba(10, 10, 12, 0.28);
	cursor: pointer;
}

.agt-chat .agt-video-option input {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin-top: 0.1rem;
	accent-color: var(--agt-brand);
}

.agt-chat .agt-video-option span {
	display: grid;
	gap: 0.1rem;
}

.agt-chat .agt-video-option strong {
	font-size: 0.8rem;
	font-weight: 650;
}

.agt-chat .agt-video-option small {
	color: var(--agt-muted);
	font-size: 0.71rem;
	line-height: 1.45;
}

.agt-chat .agt-video-actions--render {
	justify-content: flex-start;
	margin-top: 0.85rem;
}

.agt-chat .agt-video-download {
	color: var(--agt-amber-soft);
	font-size: 0.76rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.agt-chat .agt-video-output {
	margin-top: 0.9rem;
	overflow: hidden;
	border: 1px solid var(--agt-line);
	border-radius: 0.8rem;
	background: #000;
}

.agt-chat .agt-video-output video {
	display: block;
	width: 100%;
	max-height: 70vh;
	background: #000;
}

.agt-chat .agt-video-progress {
	margin: 0.7rem 0 0;
	color: var(--agt-amber-soft);
	font-size: 0.74rem;
}

/* Tema 2: janela mais larga e sem borda pesada. */
.agt-chat--theme-2 .agt-video {
	border-radius: 1rem;
}

@media (max-width: 640px) {
	.agt-chat .agt-video {
		padding: 0.85rem;
	}

	.agt-chat .agt-video-head {
		flex-direction: column;
	}

	.agt-chat .agt-video-item {
		grid-template-columns: 3.6rem minmax(0, 1fr) auto;
	}

	.agt-chat .agt-video-item-media {
		width: 3.6rem;
	}

	.agt-chat .agt-video-cue {
		grid-template-columns: 1fr auto;
	}

	.agt-chat .agt-video-cue-text {
		grid-column: 1 / -1;
	}

	.agt-chat .agt-video-cue-times {
		grid-column: 1;
	}

	.agt-chat .agt-video-cue-position {
		grid-column: 2;
	}
}
