/* Certifixe Studio · Vídeo e som. Usa as variáveis do site (--cfx-*): segue o tema claro/escuro. */

.vd-cabecalho { flex-wrap: wrap; }
.vd-atalhos { display: flex; flex-wrap: wrap; gap: 0.4rem; width: 100%; margin-top: 0.5rem; }
.vd-atalhos a {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
    text-decoration: none; color: var(--cfx-texto); background: var(--cfx-superficie); border: 1px solid var(--cfx-borda);
}
.vd-atalhos a:hover { border-color: var(--cfx-primaria); }
.vd-atalhos a.ativo { background: rgba(var(--cfx-primaria-rgb), 0.12); color: var(--cfx-primaria); border-color: rgba(var(--cfx-primaria-rgb), 0.4); }
.vd-aviso { display: flex; gap: 0.6rem; align-items: center; padding: 0.8rem 1rem; margin-bottom: 1rem; border-radius: 0.8rem; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); }

/* ---------- início ---------- */
.vd-inicio { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; border-radius: 1.1rem; background: var(--cfx-superficie); border: 1px solid var(--cfx-borda); }
.vd-largar {
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 2.5rem 1rem; margin: 0; cursor: pointer; text-align: center;
    border: 2px dashed var(--cfx-borda-campo); border-radius: 1rem; color: var(--cfx-texto-secundario); transition: border-color 0.15s, background-color 0.15s;
}
.vd-largar:hover, .vd-largar.a-largar { border-color: var(--cfx-primaria); background: rgba(var(--cfx-primaria-rgb), 0.05); }
.vd-largar > i { font-size: 2.4rem; color: var(--cfx-primaria); }
.vd-largar strong { color: var(--cfx-texto); font-size: 1.05rem; }
.vd-largar-pequeno { padding: 0.9rem; margin-bottom: 0.6rem; flex-direction: row; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.vd-largar-pequeno > i { font-size: 1.3rem; }
.vd-largar-pequeno strong { font-size: 0.9rem; }
.vd-largar-pequeno span { width: 100%; font-size: 0.75rem; }
.vd-inicio-acoes { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.vd-modelos-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.vd-modelo {
    aspect-ratio: 9 / 16; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.8rem;
    border: 0; border-radius: 1rem; color: #fff; text-align: center; cursor: pointer; box-shadow: 0 10px 24px rgba(15, 21, 53, 0.25); transition: transform 0.15s;
}
.vd-modelo:hover { transform: translateY(-3px) scale(1.02); }
.vd-modelo strong { font-size: 1rem; line-height: 1.15; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); white-space: pre-line; }
.vd-modelo span { font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }

.vd-gravar { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 1.5rem; text-align: center; position: relative; }
.vd-gravar-opcoes { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; justify-content: center; }
.vd-gravar-opcoes label { display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.vd-gravar.a-contar::after {
    content: attr(data-contagem); position: absolute; inset: 0; display: grid; place-items: center; font-size: 6rem; font-weight: 800;
    color: var(--cfx-primaria); background: var(--cfx-superficie); border-radius: 1rem; animation: vd-pulsar 0.9s ease-out;
}
@keyframes vd-pulsar { from { transform: scale(1.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vd-a-gravar { display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.vd-ponto { width: 16px; height: 16px; border-radius: 50%; background: #E11D48; animation: vd-piscar 1s infinite; }
@keyframes vd-piscar { 50% { opacity: 0.25; } }
.vd-nota { margin: 0.4rem 0 0.6rem; font-size: 0.82rem; color: var(--cfx-texto-secundario); }

/* ---------- estúdio ---------- */
.vd-barra {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.7rem; margin-bottom: 0.8rem;
    border-radius: 1rem; background: var(--cfx-superficie); border: 1px solid var(--cfx-borda);
}
.vd-nome { max-width: 220px; font-weight: 700; }
.vd-formato { max-width: 320px; }
.vd-barra-grupo { display: flex; gap: 0.3rem; }
.vd-guardado { margin-left: auto; font-size: 0.78rem; color: var(--cfx-texto-secundario); transition: opacity 0.2s; }
.vd-guardado.a-guardar { opacity: 0.4; }
.vd-exportar { font-weight: 700; padding-inline: 1.1rem; }
.vd-corpo { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.vd-lado { border-radius: 1rem; background: var(--cfx-superficie); border: 1px solid var(--cfx-borda); overflow: hidden; }
.vd-abas { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--cfx-borda); }
.vd-abas button { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.6rem 0.2rem; border: 0; background: none; color: var(--cfx-texto-secundario); font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.vd-abas button i { font-size: 1.15rem; }
.vd-abas button[aria-selected="true"] { color: var(--cfx-primaria); box-shadow: inset 0 -3px 0 var(--cfx-primaria); }
.vd-painel { padding: 0.9rem; max-height: 62vh; overflow-y: auto; }
.vd-campo { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.7rem; font-size: 0.82rem; font-weight: 600; flex: 1; min-width: 0; }
.vd-campo small { font-weight: 400; color: var(--cfx-texto-secundario); }
.vd-check { display: flex; gap: 0.45rem; align-items: center; font-size: 0.85rem; margin-bottom: 0.5rem; cursor: pointer; }
.vd-intervalo { display: flex; align-items: center; gap: 0.6rem; }
.vd-intervalo input { flex: 1; accent-color: var(--cfx-primaria); }
.vd-intervalo output { min-width: 3.2rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.8rem; }
.vd-botoes-linha { display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.5rem; }
.vd-sel { padding: 0.8rem; margin-top: 0.4rem; border-radius: 0.8rem; background: var(--cfx-superficie-suave); border: 1px solid var(--cfx-borda); }
.vd-sel-topo { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin-bottom: 0.7rem; }
.vd-sel-topo strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-sel-topo span { display: flex; gap: 0.25rem; flex: none; }
.vd-subtitulo { font-size: 0.85rem; font-weight: 700; margin: 1rem 0 0.5rem; }
.vd-fundos { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.35rem; }
.vd-fundos button { aspect-ratio: 1; border-radius: 0.5rem; border: 2px solid transparent; cursor: pointer; }
.vd-fundos button.sel { border-color: var(--cfx-texto); box-shadow: 0 0 0 2px var(--cfx-superficie) inset; }
.vd-filtros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.vd-filtros button { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.2rem; border: 2px solid transparent; border-radius: 0.6rem; background: none; font-size: 0.68rem; color: var(--cfx-texto); cursor: pointer; }
.vd-filtros button i { width: 100%; aspect-ratio: 1; border-radius: 0.45rem; background: linear-gradient(135deg, #F97316, #6672F8 55%, #15803D); }
.vd-filtros button.sel { border-color: var(--cfx-primaria); }
.vd-estilos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-bottom: 0.6rem; }
.vd-estilos button { padding: 0.55rem 0.3rem; border: 1px solid var(--cfx-borda); border-radius: 0.55rem; font-weight: 800; font-size: 0.74rem; cursor: pointer; }
.vd-posicoes { display: flex; gap: 0.3rem; }
.vd-posicoes .btn { flex: 1; }

.vd-palco { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.8rem; border-radius: 1rem; background: #0b0e1d; }
.vd-estudio { scroll-margin-top: 84px; }
.vd-ecra { width: 100%; max-height: min(64vh, calc(100vh - 300px)); display: flex; justify-content: center; }
.vd-ecra canvas { height: 100%; max-height: min(64vh, calc(100vh - 300px)); min-height: 280px; max-width: 100%; border-radius: 0.6rem; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); touch-action: none; cursor: grab; background: #000; }
.vd-ecra[data-formato="horizontal"] canvas { height: auto; width: 100%; }
.vd-controlos { display: flex; align-items: center; gap: 0.8rem; width: 100%; max-width: 760px; color: #fff; }
.vd-controlos .form-range { flex: 1; accent-color: var(--cfx-primaria); }
.vd-play { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--cfx-primaria); color: #fff; font-size: 1.4rem; display: grid; place-items: center; cursor: pointer; }
.vd-play.a-gravar { background: #E11D48; animation: vd-piscar 1s infinite; }
.vd-tempo-txt { font-variant-numeric: tabular-nums; font-size: 0.85rem; min-width: 7.5rem; }
.vd-dica { margin: 0; font-size: 0.75rem; color: rgba(255, 255, 255, 0.55); }

/* ---------- linha do tempo ---------- */
.vd-linha { margin-top: 0.8rem; border-radius: 1rem; background: var(--cfx-superficie); border: 1px solid var(--cfx-borda); padding: 0.6rem; user-select: none; }
.vd-linha-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; gap: 0.5rem; }
.vd-zoom button { border: 1px solid var(--cfx-borda); background: var(--cfx-superficie-suave); color: var(--cfx-texto); border-radius: 0.5rem; padding: 0.2rem 0.5rem; }
.vd-linha-acoes { display: flex; gap: 0.4rem; }
.vd-pistas { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
.vd-rotulos { display: grid; grid-template-rows: 22px 58px 34px 34px 34px; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--cfx-texto-secundario); }
.vd-rotulos span { display: flex; align-items: center; gap: 0.3rem; }
.vd-rolar { position: relative; overflow-x: auto; display: grid; grid-template-rows: 22px 58px 34px 34px 34px; gap: 6px; padding-bottom: 6px; }
.vd-regua { position: relative; height: 22px; cursor: pointer; border-bottom: 1px solid var(--cfx-borda); }
.vd-regua span { position: absolute; top: 2px; font-size: 0.65rem; color: var(--cfx-texto-secundario); transform: translateX(2px); border-left: 1px solid var(--cfx-borda); padding-left: 3px; }
.vd-pista { position: relative; border-radius: 0.5rem; background: var(--cfx-superficie-suave); }
.vd-bloco {
    position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 0.45rem; overflow: hidden; border: 2px solid transparent;
    border-radius: 0.5rem; color: #fff; font-size: 0.72rem; font-weight: 700; cursor: pointer; white-space: nowrap; text-align: left;
}
.vd-bloco span { overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.vd-bloco.sel { border-color: #FFE14D; box-shadow: 0 0 0 2px rgba(255, 225, 77, 0.35); }
.vd-bloco-clip { align-items: flex-end; padding-bottom: 0.3rem; }
.vd-bloco-texto { background: #7C3AED; cursor: grab; }
.vd-bloco-legenda { background: #0EA5E9; cursor: grab; }
.vd-bloco-audio { background: #16A34A; cursor: grab; }
.vd-pega { position: absolute; right: 0; top: 0; bottom: 0; width: 10px; cursor: ew-resize; background: rgba(255, 255, 255, 0.25); }
.vd-tr { position: absolute; right: -2px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%) rotate(45deg); background: #fff; border-radius: 3px; box-shadow: 0 0 0 2px var(--cfx-primaria); }
.vd-cabeca { position: absolute; top: 0; bottom: 0; width: 2px; background: #E11D48; pointer-events: none; z-index: 3; }
.vd-cabeca::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #E11D48; }

/* ---------- diálogo ---------- */
.vd-dialogo { width: min(560px, 94vw); border: 0; border-radius: 1.1rem; padding: 0; background: var(--cfx-superficie); color: var(--cfx-texto); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.vd-dialogo::backdrop { background: rgba(11, 16, 38, 0.6); backdrop-filter: blur(3px); }
.vd-dialogo-corpo { padding: 1.3rem; }
.vd-dialogo-acoes { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.vd-progresso > div { height: 12px; border-radius: 999px; background: var(--cfx-superficie-suave); overflow: hidden; border: 1px solid var(--cfx-borda); }
.vd-progresso i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4F46E5, #8E96FC); transition: width 0.2s; }
.vd-progresso span { display: block; margin-top: 0.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vd-resultado video { width: 100%; max-height: 50vh; border-radius: 0.7rem; background: #000; }
.vd-resultado audio { width: 100%; }

/* ---------- som ---------- */
.sm-nome { font-size: 1rem; }
.sm-info { font-size: 0.78rem; color: var(--cfx-texto-secundario); }
.sm-onda { height: 220px; border-radius: 1rem; background: var(--cfx-superficie); border: 1px solid var(--cfx-borda); padding: 0.6rem; }
.sm-onda canvas { width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.sm-estudio .vd-controlos { color: var(--cfx-texto); margin: 0.6rem 0; max-width: none; }
.sm-selecao { font-size: 0.85rem; color: var(--cfx-texto-secundario); }
.sm-acoes { display: flex; flex-direction: column; gap: 0.6rem; }
.sm-grupo { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; padding: 0.7rem; border-radius: 0.9rem; background: var(--cfx-superficie); border: 1px solid var(--cfx-borda); }
.sm-grupo > span { width: 100%; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cfx-texto-secundario); }
.sm-grupo .btn { font-size: 0.85rem; }
.sm-formatos { display: grid; gap: 0.6rem; }
.sm-formato { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; padding: 0.8rem; border-radius: 0.8rem; border: 1px solid var(--cfx-borda); cursor: pointer; }
.sm-formato input { grid-row: span 2; margin-top: 0.3rem; accent-color: var(--cfx-primaria); }
.sm-formato span { font-size: 0.8rem; color: var(--cfx-texto-secundario); }
.sm-medidor { width: 100%; height: 40px; border-radius: 0.5rem; background: var(--cfx-superficie-suave); margin-top: 0.8rem; }

@media (max-width: 991.98px) {
    .vd-corpo { grid-template-columns: minmax(0, 1fr); }
    .vd-palco { order: -1; }
    .vd-painel { max-height: none; }
    .vd-guardado { width: 100%; order: 9; margin-left: 0; }
    .vd-nome, .vd-formato { max-width: none; flex: 1 1 45%; }
}
@media (max-width: 575.98px) {
    .vd-ecra, .vd-ecra canvas { max-height: 52vh; }
    .vd-pistas { grid-template-columns: 64px minmax(0, 1fr); }
    .vd-rotulos span { font-size: 0.64rem; }
    .vd-abas span { font-size: 0.66rem; }
}
@media (prefers-reduced-motion: reduce) { .vd-modelo, .vd-gravar.a-contar::after, .vd-ponto { transition: none; animation: none; } }
