/* --- ESTILO RESULTADO PRAZO FÁCIL COMPLETO --- */

#geral {
	font-family   : 'Inter', sans-serif;
	color         : #333;
	background    : #FFF;
	padding       : 30px;
	border-radius : 12px;
	box-shadow    : 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* 1. Resumo dos Dados */
.dadosCalculo {
	background-color : #F8F9FA;
	border           : 1px solid #E9ECEF;
	border-left      : 6px solid #F60;
	padding          : 20px;
	margin-bottom    : 30px;
	border-radius    : 8px;
	font-size        : 1.05rem;
	line-height      : 1.8;
}

/* 2. Tabela de Resultados - Header Melhorado e Responsividade */
.styled-table {
	width            : 100%;
	border-collapse  : collapse;
	margin-bottom    : 40px;
	background-color : #FFF;
	border-radius    : 8px 8px 0 0;
	overflow         : hidden;
}
/* --- RESPONSIVIDADE (Mobile) --- */
@media screen and (max-width : 768px) {
	/* Faz a tabela deixar de ser tabela e virar blocos */
	.styled-table, .styled-table thead, .styled-table tbody, .styled-table th, .styled-table td, .styled-table tr {
		display : block;
		width   : 100%;
	}

	/* Esconde o cabeçalho original (Data, Valor, etc) que ficaria lá no topo sozinho */
	.styled-table tr:first-child {
		display : none;
	}

	/* Cada linha vira um "card" separado */
	.styled-table tr {
		margin-bottom : 20px;
		border        : 1px solid #DEE2E6;
		border-radius : 8px;
		background    : #FFF;
		padding       : 10px;
		box-shadow    : 0 2px 5px rgba(0, 0, 0, 0.05);
	}

	/* Estiliza cada célula para mostrar o nome da coluna à esquerda */
	.styled-table td {
		text-align    : right;
		padding       : 12px 10px;
		position      : relative;
		padding-left  : 50%; /* Dá espaço para o rótulo */
		border-bottom : 1px solid #F1F1F1;
	}

	/* O Pulo do Gato: Inserindo o texto do data-label via CSS */
	.styled-table td::before {
		content     : attr(data-label);
		position    : absolute;
		left        : 10px;
		width       : 45%;
		text-align  : left;
		font-weight : 700;
		font-size   : 0.75rem;
		color       : #6C757D;
	}

	.styled-table td:last-child {
		border-bottom    : none;
		background-color : #FDF2E9; /* Destaque para o Valor Final */
	}
}

/* Novo Header com Autoridade */
.styled-table tr:first-child {
	background     : linear-gradient(90deg, #212529 0%, #343A40 100%);
	color          : #FFF !important;
	font-weight    : 700;
	text-transform : uppercase;
	font-size      : 0.8rem;
	letter-spacing : 0.5px;
}

.styled-table td, .styled-table th {
	padding       : 18px 15px;
	border-bottom : 1px solid #EEE;
	text-align    : center;
}

.styled-table tr:last-child td {
	font-weight   : bold;
	color         : #000;
	border-bottom : 2px solid #F60;
}

/* 3. Títulos e Seções */
.descricaoCalc {
	font-size      : 1.5rem;
	font-weight    : 700;
	color          : #212529;
	margin-top     : 40px;
	margin-bottom  : 15px;
	border-bottom  : 2px solid #F1F3F5;
	padding-bottom : 10px;
	display        : flex;
	align-items    : center;
}

.descricaoCalc.pequeno {
	font-size  : 1.15rem;
	color      : #495057;
	border     : none;
	margin-top : 25px;
}

/* 4. Boxes de Memória de Cálculo */
#contasCorrecao, #contasCSV {
	background    : #FDFDFD;
	border        : 1px solid #DEE2E6;
	padding       : 20px;
	border-radius : 6px;
	font-family   : 'Courier New', monospace;
	font-size     : 0.95rem;
	line-height   : 1.7;
	color         : #444;
	margin-bottom : 20px;
	word-break    : break-word;
}

#contasCorrecao strong, #contasCSV strong {
	color : #D32F2F;
}

/* 5. Botão Gerar PDF */
.containerCorrecao {
	text-align  : center;
	margin-top  : 50px;
	padding-top : 25px;
	border-top  : 1px solid #EEE;
}

#botaoPDF {
	background-color : #F60;
	color            : white;
	border           : none;
	padding          : 16px 50px;
	font-size        : 1.1rem;
	font-weight      : bold;
	border-radius    : 50px;
	cursor           : pointer;
	text-transform   : uppercase;
	box-shadow       : 0 4px 12px rgba(255, 102, 0, 0.3);
	transition       : all 0.3s ease;
}

#botaoPDF:hover {
	background-color : #E65C00;
	transform        : translateY(-2px);
}

/* 6. Animação de Entrada */
#resultadoFilho {
	opacity    : 0;
	transform  : translateY(30px);
	transition : all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

#resultadoFilho.show {
	opacity   : 1;
	transform : translateY(0);
}

/* --- RESPONSIVIDADE (Tabela vira Cards no Mobile) --- */
@media screen and (max-width : 768px) {
	.styled-table, .styled-table thead, .styled-table tbody, .styled-table th, .styled-table td, .styled-table tr {
		display : block;
	}

	.styled-table tr:first-child {
		display : none; /* Esconde o header horizontal */
	}

	.styled-table tr {
		margin-bottom : 20px;
		border        : 1px solid #DEE2E6;
		border-radius : 8px;
		padding       : 10px;
	}

	.styled-table td {
		text-align    : right;
		padding       : 12px 10px;
		position      : relative;
		padding-left  : 50%;
		border-bottom : 1px solid #F1F1F1;
	}

	.styled-table td::before {
		content     : attr(data-label); /* Pega o nome da coluna do HTML */
		position    : absolute;
		left        : 10px;
		width       : 45%;
		text-align  : left;
		font-weight : 700;
		font-size   : 0.75rem;
		color       : #6C757D;
	}

	.styled-table td:last-child {
		border-bottom : none;
	}
}

#botaoPDF {
	margin-bottom : 20px;
}

@media print {
	/* 1. Esconde tudo o que não é o resultado */
	body * {
		visibility : hidden;
	}

	/* 2. Mostra apenas a div de resultado e seu conteúdo */
	#resultado, #resultado *, #geral, #geral * {
		visibility : visible;
	}

	/* 3. Posiciona o resultado no topo da página impressa */
	#resultado {
		position : absolute;
		left     : 0;
		top      : 0;
		width    : 100%;
	}

	/* 4. Remove sombras e fundos escuros para economizar tinta e ficar profissional */
	#geral {
		box-shadow : none !important;
		padding    : 0 !important;
	}

	.styled-table tr:first-child {
		background    : #EEE !important; /* Cinza claro para o PDF */
		color         : #000 !important;
		border-bottom : 2px solid #000 !important;
	}

	#contasCorrecao, #contasCSV {
		border     : 1px solid #CCC !important;
		background : #FFF !important;
		color      : #000 !important;
	}

	/* 5. Esconde o próprio botão de imprimir no PDF */
	.containerCorrecao, #botaoPDF {
		display : none !important;
	}
}

/* Garante que o PDF use toda a largura e tenha fontes nítidas */
#geral {
	max-width  : 1000px;
	margin     : 0 auto;
	box-shadow : 0 0 10px rgba(0, 0, 0, 0.1);
}

.header-pdf img {
	display : block;
}

/* Deixa a tabela com visual de documento oficial */
.styled-table {
	border-radius : 0 !important; /* Documentos oficiais não têm cantos arredondados */
	margin-top    : 20px;
}

/* O ajuste do texto legal */

@media print {
	#geral {
		box-shadow : none !important;
		padding    : 0 !important;
	}
	.containerCorrecao {
		display : none; /* Não imprime o botão de gerar PDF */
	}
}

.footer-pdf {
	margin-top        : 50px;
	border-top        : 1px solid #DEE2E6; /* Linha cinza suave */
	padding-top       : 20px;
	width             : 100%;
	page-break-inside : avoid; /* Evita que o texto seja cortado entre páginas */
}

.legal-text {
	font-family     : Helvetica, Arial, sans-serif; /* Fontes seguras para PDF */
	font-size       : 11px; /* Tamanho ideal para leitura */
	color           : #6C757D; /* Cinza profissional */
	text-align      : justify; /* Justificado */
	line-height     : 1.5; /* Espaçamento entre linhas para não embolar */

	/* CORREÇÃO DA QUEBRA: Desativa hifenização automática que buga o PDF */
	-webkit-hyphens : manual;
	-ms-hyphens     : manual;
	hyphens         : manual;

	/* Garante que palavras longas não estourem a margem */
	word-wrap       : break-word;
}

.site-link {
	text-align : center;
	margin-top : 15px;
}

.site-link a {
	color           : #0D6EFD;
	font-weight     : 700;
	text-decoration : none;
	font-size       : 14px;
}