<?php
/**
 * Modal: Brand Voice
 *
 * @since 3.2.0
 */
defined( 'ABSPATH' ) || exit;
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Included admin modal template; local presentation variables are scoped to this partial.

$voice_steps = [
	1 => [
		'icon'     => 'dashicons-admin-customizer',
		'title'    => __( 'Fundação', 'contentosapp-studio' ),
		'subtitle' => __( 'Quem está escrevendo, para quem', 'contentosapp-studio' ),
	],
	2 => [
		'icon'     => 'dashicons-format-audio',
		'title'    => __( 'Tom', 'contentosapp-studio' ),
		'subtitle' => __( '5 dimensões de voz', 'contentosapp-studio' ),
	],
	3 => [
		'icon'     => 'dashicons-category',
		'title'    => __( 'Vocabulário', 'contentosapp-studio' ),
		'subtitle' => __( 'Termos preferidos e proibidos', 'contentosapp-studio' ),
	],
	4 => [
		'icon'     => 'dashicons-star-filled',
		'title'    => __( 'Revisão', 'contentosapp-studio' ),
		'subtitle' => __( 'Prévia gerada com IA', 'contentosapp-studio' ),
	],
];

$tone_sliders = [
	'formality'    => [
		'label'  => __( 'Formalidade', 'contentosapp-studio' ),
		'scale'  => __( 'Casual → Formal', 'contentosapp-studio' ),
		'left'   => __( 'Casual', 'contentosapp-studio' ),
		'mid'    => __( 'Neutro', 'contentosapp-studio' ),
		'right'  => __( 'Formal', 'contentosapp-studio' ),
	],
	'technicality' => [
		'label'  => __( 'Nível técnico', 'contentosapp-studio' ),
		'scale'  => __( 'Iniciantes → Especialistas', 'contentosapp-studio' ),
		'left'   => __( 'Iniciantes', 'contentosapp-studio' ),
		'mid'    => __( 'Intermediário', 'contentosapp-studio' ),
		'right'  => __( 'Especialistas', 'contentosapp-studio' ),
	],
	'authority'    => [
		'label'  => __( 'Autoridade', 'contentosapp-studio' ),
		'scale'  => __( 'Cuidadoso → Categórico', 'contentosapp-studio' ),
		'left'   => __( 'Cuidadoso', 'contentosapp-studio' ),
		'mid'    => __( 'Confiante', 'contentosapp-studio' ),
		'right'  => __( 'Categórico', 'contentosapp-studio' ),
	],
	'opinion'      => [
		'label'  => __( 'Opinião', 'contentosapp-studio' ),
		'scale'  => __( 'Factual → Opinativo', 'contentosapp-studio' ),
		'left'   => __( 'Factual', 'contentosapp-studio' ),
		'mid'    => __( 'Equilibrado', 'contentosapp-studio' ),
		'right'  => __( 'Opinativo', 'contentosapp-studio' ),
	],
	'warmth'       => [
		'label'  => __( 'Calor humano', 'contentosapp-studio' ),
		'scale'  => __( 'Distante → Acolhedor', 'contentosapp-studio' ),
		'left'   => __( 'Distante', 'contentosapp-studio' ),
		'mid'    => __( 'Natural', 'contentosapp-studio' ),
		'right'  => __( 'Acolhedor', 'contentosapp-studio' ),
	],
];

$preset_cards = [
	'professional'   => [
		'icon'  => 'dashicons-portfolio',
		'title' => __( 'Profissional', 'contentosapp-studio' ),
		'desc'  => __( 'Tom corporativo, claro e direto.', 'contentosapp-studio' ),
	],
	'conversational' => [
		'icon'  => 'dashicons-coffee',
		'title' => __( 'Conversacional', 'contentosapp-studio' ),
		'desc'  => __( 'Como uma conversa de café com um especialista.', 'contentosapp-studio' ),
	],
	'academic'       => [
		'icon'  => 'dashicons-welcome-learn-more',
		'title' => __( 'Acadêmico', 'contentosapp-studio' ),
		'desc'  => __( 'Rigoroso, técnico, baseado em dados.', 'contentosapp-studio' ),
	],
	'journalistic'   => [
		'icon'  => 'dashicons-media-document',
		'title' => __( 'Jornalístico', 'contentosapp-studio' ),
		'desc'  => __( 'Factual, conciso, narrativo.', 'contentosapp-studio' ),
	],
];
?>
<div id="fos-modal-brand-voice" class="fos-modal fos-voice-modal" style="display:none" role="dialog" aria-modal="true" aria-labelledby="fos-voice-modal-title">
	<div class="fos-modal__box fos-voice-modal__box">
		<div class="fos-modal__header fos-voice-modal__header">
			<div class="fos-voice-modal__brand">
				<span class="fos-voice-modal__icon dashicons dashicons-microphone" aria-hidden="true"></span>
				<div>
					<div class="fos-voice-modal__title-row">
						<h2 id="fos-voice-modal-title" class="fos-modal__title"><?php esc_html_e( 'Configurar voz da marca', 'contentosapp-studio' ); ?></h2>
						<span id="fos-voice-site-name" class="fos-voice-site-pill"></span>
					</div>
					<p class="fos-voice-modal__subtitle"><?php esc_html_e( 'Define como os agentes vão escrever para este site.', 'contentosapp-studio' ); ?></p>
				</div>
			</div>
			<div class="fos-voice-modal__header-actions">
				<span class="fos-voice-plan-badge"><?php esc_html_e( 'STUDIO', 'contentosapp-studio' ); ?></span>
				<button type="button" class="fos-modal__close fos-voice-modal__close" aria-label="<?php esc_attr_e( 'Fechar', 'contentosapp-studio' ); ?>">
					<span class="dashicons dashicons-no-alt" aria-hidden="true"></span>
				</button>
			</div>
		</div>

		<div class="fos-modal__body fos-voice-modal__body">
			<input type="hidden" id="fos-voice-site-key" value="">

			<aside class="fos-voice-sidebar" aria-label="<?php esc_attr_e( 'Configuração em 4 passos', 'contentosapp-studio' ); ?>">
				<p class="fos-voice-sidebar__label"><?php esc_html_e( 'Configuração em 4 passos', 'contentosapp-studio' ); ?></p>
				<ol class="fos-voice-steps">
					<?php foreach ( $voice_steps as $step_number => $step ) : ?>
						<li class="fos-voice-steps__item">
							<button type="button" class="fos-voice-step-nav <?php echo esc_attr( 1 === $step_number ? 'is-active' : '' ); ?>" data-step="<?php echo esc_attr( $step_number ); ?>">
								<span class="fos-voice-step-nav__icon dashicons <?php echo esc_attr( $step['icon'] ); ?>" aria-hidden="true"></span>
								<span class="fos-voice-step-nav__text">
									<strong><?php echo esc_html( $step_number . '. ' . $step['title'] ); ?></strong>
									<small><?php echo esc_html( $step['subtitle'] ); ?></small>
								</span>
							</button>
						</li>
					<?php endforeach; ?>
				</ol>

				<div class="fos-voice-progress-card">
					<p class="fos-voice-progress-card__title"><?php esc_html_e( 'Sua voz até aqui', 'contentosapp-studio' ); ?></p>
					<dl>
						<div>
							<dt><?php esc_html_e( 'Nome', 'contentosapp-studio' ); ?></dt>
							<dd id="fos-voice-summary-name">—</dd>
						</div>
						<div>
							<dt><?php esc_html_e( 'POV', 'contentosapp-studio' ); ?></dt>
							<dd id="fos-voice-summary-pov">—</dd>
						</div>
						<div>
							<dt><?php esc_html_e( 'Tom', 'contentosapp-studio' ); ?></dt>
							<dd id="fos-voice-summary-tone">—</dd>
						</div>
						<div>
							<dt><?php esc_html_e( 'Vocab.', 'contentosapp-studio' ); ?></dt>
							<dd id="fos-voice-summary-vocab">—</dd>
						</div>
					</dl>
				</div>
			</aside>

			<main class="fos-voice-main">
				<section class="fos-voice-step-panel is-active" data-step-panel="1">
					<div class="fos-voice-step-heading">
						<p class="fos-voice-step-heading__eyebrow"><?php esc_html_e( 'Passo 1 de 4', 'contentosapp-studio' ); ?></p>
						<h3><?php esc_html_e( 'Quem está escrevendo, para quem?', 'contentosapp-studio' ); ?></h3>
						<p><?php esc_html_e( 'Os agentes vão impersonar a persona do autor escrevendo para o avatar do leitor que você descrever aqui.', 'contentosapp-studio' ); ?></p>
					</div>

					<div class="fos-voice-section">
						<p class="fos-voice-section__label"><?php esc_html_e( 'Quer começar de um modelo?', 'contentosapp-studio' ); ?></p>
						<div class="fos-voice-preset-grid">
							<?php foreach ( $preset_cards as $preset_key => $preset ) : ?>
								<button type="button" class="fos-voice-preset-card fos-voice-preset-btn" data-preset="<?php echo esc_attr( $preset_key ); ?>">
									<span class="fos-voice-preset-card__icon dashicons <?php echo esc_attr( $preset['icon'] ); ?>" aria-hidden="true"></span>
									<span>
										<strong><?php echo esc_html( $preset['title'] ); ?></strong>
										<small><?php echo esc_html( $preset['desc'] ); ?></small>
									</span>
								</button>
							<?php endforeach; ?>
						</div>
						<button type="button" id="fos-voice-blank-btn" class="fos-voice-link-btn">
							<span class="dashicons dashicons-arrow-right-alt2" aria-hidden="true"></span>
							<?php esc_html_e( 'Começar em branco', 'contentosapp-studio' ); ?>
						</button>
					</div>

					<div class="fos-voice-form-grid">
						<div class="fos-voice-field fos-voice-field--full">
							<label for="fos-voice-name"><?php esc_html_e( 'Nome da voz', 'contentosapp-studio' ); ?> <span class="fos-voice-required">*</span></label>
							<input type="text" id="fos-voice-name" class="fos-voice-input" placeholder="<?php esc_attr_e( 'Ex.: Voz Inovelead — CEO', 'contentosapp-studio' ); ?>">
							<p><?php esc_html_e( 'Aparece nas pré-visualizações e no log de geração.', 'contentosapp-studio' ); ?></p>
						</div>
						<div class="fos-voice-field fos-voice-field--full">
							<label for="fos-voice-author"><?php esc_html_e( 'Persona do autor', 'contentosapp-studio' ); ?></label>
							<textarea id="fos-voice-author" class="fos-voice-input" rows="3" placeholder="<?php esc_attr_e( 'Ex.: CEO da Inovelead, 15 anos no mercado B2B SaaS, fala com convicção e dados.', 'contentosapp-studio' ); ?>"></textarea>
							<p><?php esc_html_e( 'Quem está escrevendo. Cargo, anos de experiência, ângulo.', 'contentosapp-studio' ); ?></p>
						</div>
						<div class="fos-voice-field fos-voice-field--full">
							<label for="fos-voice-reader"><?php esc_html_e( 'Avatar do leitor-alvo', 'contentosapp-studio' ); ?></label>
							<textarea id="fos-voice-reader" class="fos-voice-input" rows="3" placeholder="<?php esc_attr_e( 'Ex.: Donos de agência e profissionais de marketing buscando escalar produção de conteúdo.', 'contentosapp-studio' ); ?>"></textarea>
							<p><?php esc_html_e( 'Com quem estamos falando. Dores, maturidade, objetivo.', 'contentosapp-studio' ); ?></p>
						</div>
						<div class="fos-voice-field">
							<label for="fos-voice-pov"><?php esc_html_e( 'Pronome', 'contentosapp-studio' ); ?></label>
							<select id="fos-voice-pov" class="fos-voice-input">
								<option value="first_plural"><?php esc_html_e( '1ª pessoa plural (Nós)', 'contentosapp-studio' ); ?></option>
								<option value="second"><?php esc_html_e( '2ª pessoa (Você)', 'contentosapp-studio' ); ?></option>
								<option value="third" selected><?php esc_html_e( '3ª pessoa (Impessoal)', 'contentosapp-studio' ); ?></option>
							</select>
						</div>
						<div class="fos-voice-field">
							<label for="fos-voice-para-len"><?php esc_html_e( 'Parágrafo', 'contentosapp-studio' ); ?></label>
							<select id="fos-voice-para-len" class="fos-voice-input">
								<option value="short"><?php esc_html_e( 'Curto · 2-3 frases', 'contentosapp-studio' ); ?></option>
								<option value="medium" selected><?php esc_html_e( 'Médio · 4-5 frases', 'contentosapp-studio' ); ?></option>
								<option value="long"><?php esc_html_e( 'Longo · 6+ frases', 'contentosapp-studio' ); ?></option>
							</select>
						</div>
						<div class="fos-voice-switch-row fos-voice-field--full">
							<label class="fos-voice-switch">
								<span class="fos-toggle">
									<input type="checkbox" id="fos-voice-emojis">
									<span class="fos-toggle__track"></span>
									<span class="fos-toggle__thumb"></span>
								</span>
								<span><?php esc_html_e( 'Permitir emojis', 'contentosapp-studio' ); ?></span>
							</label>
							<label class="fos-voice-switch">
								<span class="fos-toggle">
									<input type="checkbox" id="fos-voice-h2-q">
									<span class="fos-toggle__track"></span>
									<span class="fos-toggle__thumb"></span>
								</span>
								<span><?php esc_html_e( 'H2 como perguntas', 'contentosapp-studio' ); ?></span>
							</label>
						</div>
					</div>
				</section>

				<section class="fos-voice-step-panel" data-step-panel="2">
					<div class="fos-voice-step-heading">
						<p class="fos-voice-step-heading__eyebrow"><?php esc_html_e( 'Passo 2 de 4', 'contentosapp-studio' ); ?></p>
						<h3><?php esc_html_e( 'Como soa a voz da marca?', 'contentosapp-studio' ); ?></h3>
						<p><?php esc_html_e( 'Ajuste cada dimensão. As âncoras descrevem o que significa cada extremo.', 'contentosapp-studio' ); ?></p>
					</div>

					<div class="fos-voice-tone-layout">
						<div class="fos-voice-tone-controls">
							<?php foreach ( $tone_sliders as $id => $slider ) : ?>
								<div class="fos-voice-slider-group" data-tone="<?php echo esc_attr( $id ); ?>">
									<div class="fos-voice-slider-header">
										<label class="fos-voice-slider-label" for="fos-voice-<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $slider['label'] ); ?></label>
										<span class="fos-voice-slider-scale"><?php echo esc_html( $slider['scale'] ); ?></span>
									</div>
									<div class="fos-voice-slider-wrap">
										<input type="range" class="fos-voice-slider" id="fos-voice-<?php echo esc_attr( $id ); ?>" min="1" max="5" step="1" value="3">
										<span class="fos-voice-slider-value" id="val-<?php echo esc_attr( $id ); ?>">3</span>
									</div>
									<div class="fos-voice-slider-anchors" aria-hidden="true">
										<span><?php echo esc_html( $slider['left'] ); ?></span>
										<span><?php echo esc_html( $slider['mid'] ); ?></span>
										<span><?php echo esc_html( $slider['right'] ); ?></span>
									</div>
									<p class="fos-voice-slider-desc" id="desc-<?php echo esc_attr( $id ); ?>">—</p>
								</div>
							<?php endforeach; ?>
						</div>

						<aside class="fos-voice-dna-card">
							<p class="fos-voice-dna-card__label"><?php esc_html_e( 'Voice DNA', 'contentosapp-studio' ); ?></p>
							<div class="fos-voice-radar" data-radar="main" aria-hidden="true"></div>
							<blockquote id="fos-voice-tone-quote">
								<?php esc_html_e( '“A empresa pode fazer um plano simples, sem firula, usando algumas métricas-chave e o passo certo para escalar.”', 'contentosapp-studio' ); ?>
							</blockquote>
							<p class="fos-voice-dna-card__hint"><?php esc_html_e( 'Amostra gerada localmente · não consome crédito', 'contentosapp-studio' ); ?></p>
						</aside>
					</div>
				</section>

				<section class="fos-voice-step-panel" data-step-panel="3">
					<div class="fos-voice-step-heading">
						<p class="fos-voice-step-heading__eyebrow"><?php esc_html_e( 'Passo 3 de 4', 'contentosapp-studio' ); ?></p>
						<h3><?php esc_html_e( 'Que palavras usar — e evitar?', 'contentosapp-studio' ); ?></h3>
						<p><?php esc_html_e( 'Termos preferidos viram diretiva positiva. Banidos viram regra dura. Assinaturas reforçam a memória da marca.', 'contentosapp-studio' ); ?></p>
					</div>

					<div class="fos-voice-vocab-layout">
						<div class="fos-voice-vocab-stack">
							<div class="fos-voice-vocab-card fos-voice-vocab-card--preferred">
								<div class="fos-voice-vocab-card__header">
									<span class="fos-voice-vocab-card__icon dashicons dashicons-yes-alt" aria-hidden="true"></span>
									<div>
										<h4><?php esc_html_e( 'Termos preferidos', 'contentosapp-studio' ); ?> <span id="fos-voice-count-preferred" class="fos-voice-count-pill">0</span></h4>
										<p><?php esc_html_e( 'Os agentes priorizarão essas escolhas quando houver opção.', 'contentosapp-studio' ); ?></p>
									</div>
								</div>
								<div class="fos-chip-input-container" id="container-preferred">
									<input type="text" class="fos-chip-input" placeholder="<?php esc_attr_e( 'Digite e pressione Enter', 'contentosapp-studio' ); ?>">
								</div>
								<div class="fos-voice-suggestions">
									<span><?php esc_html_e( 'Sugestões:', 'contentosapp-studio' ); ?></span>
									<button type="button" class="fos-voice-suggestion" data-chip-type="preferred" data-chip="<?php echo esc_attr__( 'organic', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'organic', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="preferred" data-chip="<?php echo esc_attr__( 'productivity', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'productivity', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="preferred" data-chip="<?php echo esc_attr__( 'ROI', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'ROI', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="preferred" data-chip="<?php echo esc_attr__( 'playbook', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'playbook', 'contentosapp-studio' ); ?></button>
								</div>
							</div>

							<div class="fos-voice-vocab-card fos-voice-vocab-card--avoid">
								<div class="fos-voice-vocab-card__header">
									<span class="fos-voice-vocab-card__icon dashicons dashicons-no-alt" aria-hidden="true"></span>
									<div>
										<h4><?php esc_html_e( 'Termos a evitar', 'contentosapp-studio' ); ?> <span id="fos-voice-count-avoid" class="fos-voice-count-pill">0</span></h4>
										<p><?php esc_html_e( 'Bloqueia clichês e palavras que conflitam com a marca.', 'contentosapp-studio' ); ?></p>
									</div>
								</div>
								<div class="fos-chip-input-container" id="container-avoid">
									<input type="text" class="fos-chip-input" placeholder="<?php esc_attr_e( 'Digite e pressione Enter', 'contentosapp-studio' ); ?>">
								</div>
								<div class="fos-voice-suggestions">
									<span><?php esc_html_e( 'Sugestões:', 'contentosapp-studio' ); ?></span>
									<button type="button" class="fos-voice-suggestion" data-chip-type="avoid" data-chip="<?php echo esc_attr__( 'synergistic', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'synergistic', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="avoid" data-chip="<?php echo esc_attr__( 'game changer', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'game changer', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="avoid" data-chip="<?php echo esc_attr__( 'disruptive', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'disruptive', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="avoid" data-chip="<?php echo esc_attr__( 'move the needle', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'move the needle', 'contentosapp-studio' ); ?></button>
								</div>
							</div>

							<div class="fos-voice-vocab-card fos-voice-vocab-card--replacements">
								<div class="fos-voice-vocab-card__header">
									<span class="fos-voice-vocab-card__icon dashicons dashicons-randomize" aria-hidden="true"></span>
									<div>
										<h4><?php esc_html_e( 'Substituições', 'contentosapp-studio' ); ?> <span id="fos-voice-count-replacements" class="fos-voice-count-pill">0</span></h4>
										<p><?php esc_html_e( 'Trocas cirúrgicas: quando uma palavra aparecer, os agentes devem preferir a alternativa.', 'contentosapp-studio' ); ?></p>
									</div>
								</div>
								<div id="fos-voice-replacements-list" class="fos-voice-replacements-list"></div>
								<div class="fos-voice-replacement-form">
									<input type="text" id="fos-voice-replace-from" class="fos-voice-input" placeholder="<?php esc_attr_e( 'Evitar: usuário', 'contentosapp-studio' ); ?>">
									<span aria-hidden="true">→</span>
									<input type="text" id="fos-voice-replace-to" class="fos-voice-input" placeholder="<?php esc_attr_e( 'Usar: cliente', 'contentosapp-studio' ); ?>">
									<button type="button" id="fos-voice-add-replacement" class="fos-voice-mini-btn"><?php esc_html_e( 'Adicionar', 'contentosapp-studio' ); ?></button>
								</div>
							</div>

							<div class="fos-voice-vocab-card fos-voice-vocab-card--signatures">
								<div class="fos-voice-vocab-card__header">
									<span class="fos-voice-vocab-card__icon dashicons dashicons-star-filled" aria-hidden="true"></span>
									<div>
										<h4><?php esc_html_e( 'Assinaturas', 'contentosapp-studio' ); ?> <span id="fos-voice-count-signatures" class="fos-voice-count-pill">0</span></h4>
										<p><?php esc_html_e( 'Frases curtas que os agentes podem usar para reforçar a voz.', 'contentosapp-studio' ); ?></p>
									</div>
								</div>
								<div class="fos-chip-input-container" id="container-signatures">
									<input type="text" class="fos-chip-input" placeholder="<?php esc_attr_e( 'Digite e pressione Enter', 'contentosapp-studio' ); ?>">
								</div>
								<div class="fos-voice-suggestions">
									<span><?php esc_html_e( 'Sugestões:', 'contentosapp-studio' ); ?></span>
									<button type="button" class="fos-voice-suggestion" data-chip-type="signatures" data-chip="<?php echo esc_attr__( 'Marketing that measures what matters.', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'signature', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-suggestion" data-chip-type="signatures" data-chip="<?php echo esc_attr__( 'No fluff, with method.', 'contentosapp-studio' ); ?>">+ <?php esc_html_e( 'method', 'contentosapp-studio' ); ?></button>
								</div>
							</div>

							<div class="fos-voice-vocab-card fos-voice-vocab-card--rules">
								<div class="fos-voice-vocab-card__header">
									<span class="fos-voice-vocab-card__icon dashicons dashicons-list-view" aria-hidden="true"></span>
									<div>
										<h4><?php esc_html_e( 'Regras rápidas', 'contentosapp-studio' ); ?></h4>
										<p><?php esc_html_e( 'Diretrizes explícitas que entram no prompt como fazer e não fazer.', 'contentosapp-studio' ); ?></p>
									</div>
								</div>
								<div class="fos-voice-rules-grid">
									<div>
										<label><?php esc_html_e( 'O que fazer', 'contentosapp-studio' ); ?> <span id="fos-voice-count-dos" class="fos-voice-count-pill">0</span></label>
										<div class="fos-chip-input-container" id="container-dos">
											<input type="text" class="fos-chip-input" placeholder="<?php esc_attr_e( 'Ex.: usar exemplos práticos', 'contentosapp-studio' ); ?>">
										</div>
									</div>
									<div>
										<label><?php esc_html_e( 'O que não fazer', 'contentosapp-studio' ); ?> <span id="fos-voice-count-donts" class="fos-voice-count-pill">0</span></label>
										<div class="fos-chip-input-container" id="container-donts">
											<input type="text" class="fos-chip-input" placeholder="<?php esc_attr_e( 'Ex.: prometer resultado garantido', 'contentosapp-studio' ); ?>">
										</div>
									</div>
								</div>
							</div>

							<div class="fos-voice-pack-row">
								<div>
									<strong><?php esc_html_e( 'Pacotes prontos', 'contentosapp-studio' ); ?></strong>
									<small><?php esc_html_e( 'Aplicam conjuntos de termos de uma vez.', 'contentosapp-studio' ); ?></small>
								</div>
								<div class="fos-voice-pack-actions">
									<button type="button" class="fos-voice-pack-btn" data-pack="marketing"><?php esc_html_e( 'Marketing B2B', 'contentosapp-studio' ); ?></button>
									<button type="button" class="fos-voice-pack-btn" data-pack="editorial"><?php esc_html_e( 'Editorial sério', 'contentosapp-studio' ); ?></button>
								</div>
							</div>
						</div>

						<aside class="fos-voice-impact-card">
							<p class="fos-voice-impact-card__label"><?php esc_html_e( 'Impacto no prompt', 'contentosapp-studio' ); ?></p>
							<div class="fos-voice-impact-grid">
								<div class="is-preferred"><span><?php esc_html_e( 'Sempre usar', 'contentosapp-studio' ); ?></span><strong id="fos-voice-impact-preferred">0</strong></div>
								<div class="is-avoid"><span><?php esc_html_e( 'Nunca usar', 'contentosapp-studio' ); ?></span><strong id="fos-voice-impact-avoid">0</strong></div>
								<div><span><?php esc_html_e( 'Substituições', 'contentosapp-studio' ); ?></span><strong id="fos-voice-impact-replacements">0</strong></div>
								<div class="is-signature"><span><?php esc_html_e( 'Assinaturas', 'contentosapp-studio' ); ?></span><strong id="fos-voice-impact-signatures">0</strong></div>
							</div>
							<div class="fos-voice-prompt-snippet">
								<span><?php esc_html_e( 'Trecho gerado para o agente redator', 'contentosapp-studio' ); ?></span>
								<code id="fos-voice-prompt-snippet"><?php esc_html_e( '# VOCABULARY ## prioritize — ## prohibit —', 'contentosapp-studio' ); ?></code>
							</div>
							<div id="fos-voice-conflict-status" class="fos-voice-conflict-status is-ok">
								<span class="dashicons dashicons-yes-alt" aria-hidden="true"></span>
								<p><?php esc_html_e( 'Sem conflitos detectados.', 'contentosapp-studio' ); ?></p>
							</div>
						</aside>
					</div>
				</section>

				<section class="fos-voice-step-panel" data-step-panel="4">
					<div class="fos-voice-step-heading">
						<p class="fos-voice-step-heading__eyebrow"><?php esc_html_e( 'Passo 4 de 4', 'contentosapp-studio' ); ?></p>
						<h3><?php esc_html_e( 'Tudo certo. Gere uma prévia e salve.', 'contentosapp-studio' ); ?></h3>
						<p><?php esc_html_e( 'Confira o resumo, gere uma prévia opcional e clique em Salvar.', 'contentosapp-studio' ); ?></p>
					</div>

					<div class="fos-voice-review-layout">
						<div class="fos-voice-review-card">
							<div class="fos-voice-review-card__header">
								<h4><span class="dashicons dashicons-controls-volumeon" aria-hidden="true"></span> <span id="fos-voice-review-name">—</span></h4>
								<button type="button" class="fos-voice-edit-step" data-step="1"><?php esc_html_e( 'Editar', 'contentosapp-studio' ); ?></button>
							</div>
							<dl class="fos-voice-review-list">
								<div>
									<dt><?php esc_html_e( 'Persona do autor', 'contentosapp-studio' ); ?></dt>
									<dd id="fos-voice-review-author">—</dd>
								</div>
								<div>
									<dt><?php esc_html_e( 'Leitor-alvo', 'contentosapp-studio' ); ?></dt>
									<dd id="fos-voice-review-reader">—</dd>
								</div>
								<div>
									<dt><?php esc_html_e( 'Pronome', 'contentosapp-studio' ); ?></dt>
									<dd id="fos-voice-review-pov">—</dd>
								</div>
								<div>
									<dt><?php esc_html_e( 'Parágrafo', 'contentosapp-studio' ); ?></dt>
									<dd id="fos-voice-review-paragraph">—</dd>
								</div>
								<div>
									<dt><?php esc_html_e( 'Vocabulário', 'contentosapp-studio' ); ?></dt>
									<dd id="fos-voice-review-vocab">—</dd>
								</div>
								<div>
									<dt><?php esc_html_e( 'Exemplos', 'contentosapp-studio' ); ?></dt>
									<dd id="fos-voice-review-samples">—</dd>
								</div>
							</dl>
							<div class="fos-voice-samples-section">
								<div class="fos-voice-samples-section__header">
									<div>
										<h5><?php esc_html_e( 'Exemplos de voz', 'contentosapp-studio' ); ?></h5>
										<p><?php esc_html_e( 'Opcional. Até 3 trechos curtos ajudam o agente a reconhecer ritmo e escolhas de escrita.', 'contentosapp-studio' ); ?></p>
									</div>
									<span id="fos-voice-samples-count" class="fos-voice-samples-count">0/3</span>
								</div>
								<div class="fos-voice-samples-grid">
									<label class="fos-voice-sample-field" for="fos-voice-sample-1">
										<span><?php esc_html_e( 'Amostra 1', 'contentosapp-studio' ); ?></span>
										<textarea id="fos-voice-sample-1" class="fos-voice-input fos-voice-sample-input" rows="3" placeholder="<?php esc_attr_e( 'Ex.: parágrafo que representa bem esta voz...', 'contentosapp-studio' ); ?>"></textarea>
									</label>
									<label class="fos-voice-sample-field" for="fos-voice-sample-2">
										<span><?php esc_html_e( 'Amostra 2', 'contentosapp-studio' ); ?></span>
										<textarea id="fos-voice-sample-2" class="fos-voice-input fos-voice-sample-input" rows="3" placeholder="<?php esc_attr_e( 'Outro trecho opcional...', 'contentosapp-studio' ); ?>"></textarea>
									</label>
									<label class="fos-voice-sample-field" for="fos-voice-sample-3">
										<span><?php esc_html_e( 'Amostra 3', 'contentosapp-studio' ); ?></span>
										<textarea id="fos-voice-sample-3" class="fos-voice-input fos-voice-sample-input" rows="3" placeholder="<?php esc_attr_e( 'Mais uma referência, se fizer sentido...', 'contentosapp-studio' ); ?>"></textarea>
									</label>
								</div>
							</div>
							<div class="fos-voice-review-radar">
								<p><?php esc_html_e( 'Tom — 5 dimensões', 'contentosapp-studio' ); ?></p>
								<div class="fos-voice-radar fos-voice-radar--compact" data-radar="review" aria-hidden="true"></div>
							</div>
						</div>

						<div class="fos-voice-preview-card">
							<div class="fos-voice-preview-card__header">
								<h4><span class="dashicons dashicons-star-filled" aria-hidden="true"></span> <?php esc_html_e( 'Prévia gerada com IA', 'contentosapp-studio' ); ?></h4>
								<span><?php esc_html_e( '~150 palavras · 1 crédito', 'contentosapp-studio' ); ?></span>
							</div>
							<div id="fos-voice-preview-box" class="fos-voice-preview-content">
								<div class="fos-voice-preview-empty">
									<?php esc_html_e( 'A prévia é opcional. Gere uma amostra para validar o tom antes de salvar.', 'contentosapp-studio' ); ?>
								</div>
							</div>
							<button type="button" id="fos-voice-preview-btn" class="fos-voice-preview-btn">
								<span class="dashicons dashicons-update" aria-hidden="true"></span>
								<?php esc_html_e( 'Gerar prévia', 'contentosapp-studio' ); ?>
							</button>
						</div>
					</div>
				</section>
			</main>
		</div>

		<div class="fos-modal__footer fos-voice-modal__footer">
			<div class="fos-voice-modal__footer-left">
				<button type="button" id="fos-voice-delete-btn" class="fos-voice-delete-btn" style="display:none">
					<span class="dashicons dashicons-trash" aria-hidden="true"></span>
					<?php esc_html_e( 'Excluir voz', 'contentosapp-studio' ); ?>
				</button>
			</div>
			<div class="fos-voice-modal__footer-right">
				<button type="button" class="cts-btn cts-btn--ghost fos-modal__close"><?php esc_html_e( 'Cancelar', 'contentosapp-studio' ); ?></button>
				<button type="button" id="fos-voice-prev-btn" class="cts-btn cts-btn--ghost" style="display:none">← <?php esc_html_e( 'Voltar', 'contentosapp-studio' ); ?></button>
				<button type="button" id="fos-voice-next-btn" class="cts-btn cts-btn--primary"><?php esc_html_e( 'Continuar', 'contentosapp-studio' ); ?> →</button>
				<button type="button" id="fos-voice-save-btn" class="cts-btn cts-btn--primary" style="display:none">
					<span class="dashicons dashicons-saved" aria-hidden="true"></span>
					<?php esc_html_e( 'Salvar voz da marca', 'contentosapp-studio' ); ?>
				</button>
			</div>
		</div>
	</div>
</div>
