/**
 * Estilos para Informa API Client - Frontend
 * Adaptados del componente Joomla para WordPress
 */

/* === HEADER DEL INFORME === */

.informe-header {
	margin-bottom: 2em;
}

.informe-header .company-name {
	font-size: 1.6em;
	color: #274452;
	font-weight: 700;
	margin: 0 0 1em 0;
	padding: 0;
	border: none;
}

/* === CONTENEDOR PRINCIPAL DEL INFORME === */

.informeNorte {
	background: #fff;
	padding: 0;
	margin: 0;
	max-width: 1200px;
}

.informeNorte h1 {
	font-size: 2.2em;
	color: #2c3e50;
	font-weight: 700;
	margin: 0 0 1.5em 0;
	padding: 0;
	border: none;
	line-height: 1.3;
}

.informeNorte h2 {
	font-size: 1.8em;
	color: #34495e;
	font-weight: 700;
	margin: 2.5em 0 1.2em 0;
	padding: 0 0 0.8em 1em;
	border-bottom: 3px solid #e0e0e0;
}

.informeNorte h3 {
	font-size: 1.4em;
	color: #2c3e50;
	font-weight: 700;
	margin: 1.8em 0 1em 0;
	padding: 0.6em 0 0.6em 1.2em;
	background: #f8f9fa;
	border-left: 4px solid #ee721f;
}

.informeNorte h4 {
	font-size: 1.15em;
	color: #34495e;
	font-weight: 600;
	margin: 1.3em 0 0.8em 0;
	padding: 0.4em 0 0.4em 1.5em;
	border-left: 3px solid #95a5a6;
}

.informeNorte h5 {
	font-size: 1em;
	color: #666;
	margin: 1em 0 0.5em 0;
	font-weight: 600;
}

/* === LISTAS Y ELEMENTOS === */

.informeNorte ul {
	list-style-type: none;
	padding: 0;
	margin: 0 0 1.5em 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	border-radius: 6px;
	overflow: hidden;
}

.informeNorte ul > li {
	padding: 14px 20px;
	line-height: 1.7;
	border-bottom: 1px solid #e8e8e8;
	background: #fff;
	transition: background 0.2s ease;
	list-style: none;
}

.informeNorte ul > li::before {
	display: none;
}

.informeNorte ul > li::marker {
	display: none;
	content: none;
}

.informeNorte ul > li:hover {
	background: #f8f9fa;
}

.informeNorte ul > li:last-child {
	border-bottom: none;
}

.informeNorte ul > li:nth-child(even) {
	background-color: #fafbfc;
}

.informeNorte ul > li:nth-child(even):hover {
	background-color: #f0f2f4;
}

.informeNorte .informe-item strong {
	display: inline-block;
	min-width: 250px;
	color: #2c3e50;
	font-weight: 600;
	font-size: 0.95em;
}

/* === BLOQUES CONTENEDORES === */

.informeNorte .block-container {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	margin: 0 0 2em 2em;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.informeNorte .block-container h3,
.informeNorte .block-container h4 {
	background: #f5f5f5;
	color: #555;
	padding: 8px 12px;
	margin: 0;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	font-size: 0.95em;
	font-weight: 600;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
}

.informeNorte .block-container > ul {
	margin: 0;
	padding: 0;
	box-shadow: none;
	border-radius: 0;
}

.informeNorte .block-container > ul > li {
	border-left: none;
	border-right: none;
	border-radius: 0;
}

.informeNorte .block-container > ul > li:first-child {
	border-top: 1px solid #e8e8e8;
}

/* === TABLAS === */

.table-balance {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border-radius: 6px;
	overflow: hidden;
}

.table-balance thead {
	background: linear-gradient(242deg, #ee721f 0%, #f8ae1e 100%);
}

.table-balance th {
	padding: 14px 16px;
	text-align: left;
	font-weight: 600;
	color: #fff !important;
	border: none;
	font-size: 0.95em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
}

.table-balance td {
	padding: 12px 16px;
	border-bottom: 1px solid #e8e8e8;
	font-size: 0.95em;
}

.table-balance th:nth-child(3),
.table-balance td:nth-child(3) {
	text-align: right;
	font-weight: 600;
	font-family: 'Courier New', monospace;
}

.table-balance tbody tr:nth-child(even) {
	background-color: #fafbfc;
}

.table-balance tbody tr:hover {
	background-color: #e8f4f8;
	transition: background 0.2s ease;
}

.table-balance tbody tr:last-child td {
	border-bottom: none;
}

/* === MAPAS === */

.informe-map-container {
	margin: 15px 0;
	padding: 0;
	border: none !important;
	background: none !important;
}

.leafletMap,
.informe-map {
	height: 250px;
	width: 100%;
	border: 2px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* === LISTAS EN LÍNEA (teléfonos, URLs) === */

.informe-list {
	display: inline;
	list-style: none;
	padding: 0 !important;
	margin: 0 !important;
}

.informe-list li {
	display: inline;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	background: none !important;
}

.informe-list li:before {
	content: ", ";
}

.informe-list li:first-child:before {
	content: "";
}

/* === SECCIONES === */

.pan {
	margin-bottom: 2em;
}

.informe-section {
	margin-bottom: 3em;
}

/* === BOTONES Y ACCIONES === */

.dont-print {
	margin: 0 0 30px 0;
}

/* Contenedor de acciones del informe */
.informe-actions {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.informe-actions .et_pb_button_module_wrapper {
	margin: 0;
}

/* Botón secundario (Volver) */
.informe-actions .btn-secondary {
	background-image: linear-gradient(242deg, #274452 0%, #3a5f70 100%) !important;
}

.informe-actions .btn-secondary:hover {
	background-image: linear-gradient(242deg, #1a2f3a 0%, #2c4a5a 100%) !important;
}

/* Footer del informe con botón volver */
.informe-footer {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 2px solid #e0e0e0;
}

.informe-footer .btn-secondary {
	background-image: linear-gradient(242deg, #274452 0%, #3a5f70 100%) !important;
}

.informe-footer .btn-secondary:hover {
	background-image: linear-gradient(242deg, #1a2f3a 0%, #2c4a5a 100%) !important;
}

/* Estilos del botón copiados de Divi et_pb_button - estilo CONTACTA */
.dont-print .et_pb_button {
	font-size: 16px;
	font-weight: 500;
	padding: 10px 24px;
	line-height: 1.7em;
	background-image: linear-gradient(242deg, #ee721f 0%, #f8ae1e 100%);
	border: 0px solid;
	border-radius: 22px 0px 22px 22px;
	cursor: pointer;
	display: inline-block;
	text-decoration: none;
	transition: all 300ms ease 0ms;
	color: #ffffff;
	text-transform: uppercase;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
}

.dont-print .et_pb_button:hover {
	background-image: linear-gradient(242deg, #d4651b 0%, #e09a1a 100%);
	color: #ffffff !important;
	padding: 10px 24px !important;
	font-size: 16px !important;
	transform: none !important;
	letter-spacing: 0 !important;
}

.dont-print .et_pb_button:hover:after {
	display: none !important;
}

/* === FORMULARIO DE BÚSQUEDA === */

.informa-search-wrapper {
	background: #f5f5f5;
	padding: 25px;
	border-radius: 8px;
	margin-bottom: 30px;
	border: 1px solid #ddd;
}

.informa-cif-search,
.informa-advanced-search {
	background: #fff;
	padding: 20px;
	border-radius: 6px;
	margin-bottom: 20px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.informa-search-wrapper h2 {
	font-size: 1.4em;
	margin: 0 0 20px 0;
	padding: 0 0 15px 0;
	color: #274452;
	border-bottom: 2px solid #ee721f;
	text-indent: 0;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
}

.informa-search-wrapper label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
	width: auto;
}

.informa-search-wrapper .form-control {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.informa-search-wrapper .form-control:focus {
	border-color: #ee721f;
	outline: none;
	box-shadow: 0 0 0 3px rgba(238, 114, 31, 0.1);
}

.informa-search-wrapper .btn {
	padding: 10px 24px;
	border: 0px solid;
	border-radius: 22px 0px 22px 22px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 500;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
	transition: all 300ms ease 0ms;
	text-transform: uppercase;
	line-height: 1.7em;
	display: inline-block;
	text-decoration: none;
}

.informa-search-wrapper .btn-primary {
	background-image: linear-gradient(242deg, #ee721f 0%, #f8ae1e 100%);
	color: #fff;
}

.informa-search-wrapper .btn-primary:hover {
	background-image: linear-gradient(242deg, #d4651b 0%, #e09a1a 100%);
	color: #fff;
}

.informa-search-wrapper .btn-secondary {
	background-image: linear-gradient(242deg, #274452 0%, #3a5f70 100%);
	color: #fff;
	margin-left: 10px;
}

.informa-search-wrapper .btn-secondary:hover {
	background-image: linear-gradient(242deg, #1a2f3a 0%, #2c4a5a 100%);
	color: #fff;
}

.form-group {
	margin-bottom: 20px;
}

/* === RESULTADOS === */

.informa-search-results {
	margin-top: 30px;
}

.informa-search-results .results-count {
	font-size: 1.1em;
	margin-bottom: 20px;
	padding: 15px 20px;
	background: #e7f5fe;
	border-left: 4px solid #ee721f;
	border-radius: 4px;
}

.informa-results-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border-radius: 6px;
	overflow: hidden;
}

.informa-results-table thead {
	background: linear-gradient(242deg, #ee721f 0%, #f8ae1e 100%);
}

.informa-results-table th {
	padding: 14px 16px;
	text-align: left;
	font-weight: 600;
	color: #fff !important;
	border: none;
	font-size: 0.95em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
}

.informa-results-table td {
	padding: 12px 16px;
	border-bottom: 1px solid #e8e8e8;
	color: #333;
	font-size: 0.95em;
}

.informa-results-table tbody tr:nth-child(even) {
	background-color: #fafbfc;
}

.informa-results-table tbody tr:hover {
	background-color: #e8f4f8;
	transition: background 0.2s ease;
}

.informa-results-table tbody tr:last-child td {
	border-bottom: none;
}

.informa-results-table a {
	color: #ee721f;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease-in-out;
}

.informa-results-table a:hover {
	color: #274452;
	text-decoration: underline;
}

/* === PAGINACIÓN === */

.informa-pagination {
	margin-top: 30px;
	text-align: center;
}

.informa-pagination .page-numbers {
	display: inline-block;
	padding: 8px 15px;
	margin: 0 5px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 3px;
	color: #274452;
	text-decoration: none;
	transition: all 0.2s ease-in-out;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
}

.informa-pagination .page-numbers:hover,
.informa-pagination .page-numbers.current {
	background: #ee721f;
	color: #fff;
	border-color: #ee721f;
}

/* === ALERTAS === */

.alert {
	padding: 15px 20px;
	margin-bottom: 20px;
	border-radius: 4px;
	border-left: 4px solid;
}

.alert-danger {
	background: #f8d7da;
	border-left-color: #dc3545;
	color: #721c24;
}

.alert-info {
	background: #d1ecf1;
	border-left-color: #ee721f;
	color: #0c5460;
}

/* === ESTILOS PARA PÁGINA DE IMPRESIÓN === */

.informa-print-page {
	background: #fff !important;
	padding: 20px;
	margin: 0;
}

.informa-print-page #wpadminbar,
.informa-print-page header,
.informa-print-page footer,
.informa-print-page nav,
.informa-print-page .site-header,
.informa-print-page .site-footer,
.informa-print-page .et-fixed-header,
.informa-print-page #main-header,
.informa-print-page #main-footer,
.informa-print-page #top-header,
.informa-print-page #bottom-footer,
.informa-print-page .dont-print {
	display: none !important;
}

.informa-print-page .informa-company-detail {
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* === ESTILOS PARA IMPRESIÓN === */

@media print {
	* {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	body {
		font-size: 9pt;
		line-height: 1.2;
		margin: 0;
		padding: 0;
	}

	/* Ocultar solo elementos de navegación */
	.dont-print,
	.informe-actions,
	.informa-search-wrapper {
		display: none !important;
	}

	/* Mapas más pequeños para impresión */
	.informe-map-container {
		margin: 4pt 0;
	}

	.informe-map,
	.leafletMap,
	.leaflet-container {
		height: 120px !important;
		width: 100% !important;
		page-break-inside: avoid;
	}

	.informeNorte {
		padding: 0;
		box-shadow: none;
		max-width: 100%;
	}

	/* Listas muy compactas */
	.informeNorte ul {
		margin: 2pt 0;
		padding: 0;
		box-shadow: none;
	}

	.informeNorte ul > li {
		padding: 1pt 4pt;
		line-height: 1.15;
		border-bottom: none;
	}

	.informeNorte .informe-item strong {
		min-width: 180px;
		font-size: 8pt;
	}

	/* Bloques contenedores compactos */
	.informeNorte .block-container {
		margin: 2pt 0 4pt 8pt;
		box-shadow: none;
		border: 1px solid #ccc;
	}

	.informeNorte .block-container h3,
	.informeNorte .block-container h4 {
		padding: 3pt 6pt;
		font-size: 9pt;
	}

	/* Evitar page-break-inside en bloques pequeños */
	.pan,
	.block-container {
		page-break-inside: avoid;
	}

	/* Permitir que las secciones grandes se dividan */
	.informe-section {
		page-break-inside: auto;
		margin-bottom: 6pt;
	}

	/* Mantener títulos con su contenido */
	.informeNorte h1,
	.informeNorte h2,
	.informeNorte h3,
	.informeNorte h4 {
		page-break-after: avoid;
	}

	.informeNorte h1 {
		font-size: 14pt;
		margin: 0 0 4pt 0;
	}

	.informeNorte h2 {
		font-size: 11pt;
		margin: 6pt 0 2pt 0;
		padding: 0 0 2pt 6pt;
		border-bottom: 1px solid #ccc;
	}

	.informeNorte h3 {
		font-size: 9pt;
		margin: 4pt 0 2pt 0;
		padding: 2pt 0 2pt 8pt;
		background: #f0f0f0;
	}

	.informeNorte h4 {
		font-size: 8pt;
		margin: 3pt 0 1pt 0;
		padding: 1pt 0 1pt 10pt;
	}

	.informeNorte h5 {
		font-size: 8pt;
		margin: 2pt 0 1pt 0;
	}

	.informe-header {
		margin-bottom: 6pt;
	}

	.informe-header .company-name {
		font-size: 12pt;
		margin: 0 0 4pt 0;
	}

	/* Tablas compactas */
	.table-balance {
		font-size: 7pt;
		margin: 4pt 0;
		box-shadow: none;
	}

	.table-balance th {
		padding: 2pt 3pt;
		font-size: 7pt;
	}

	.table-balance td {
		padding: 1pt 3pt;
	}

	/* Paneles muy compactos */
	.pan {
		margin-bottom: 4pt;
		padding: 2pt;
	}

	.pan h4 {
		font-size: 8pt;
		margin: 0 0 2pt 0;
		padding: 2pt 4pt;
	}
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
	.informeNorte {
		padding: 15px;
	}

	.informeNorte h1 {
		font-size: 1.5em;
	}

	.informeNorte h2 {
		font-size: 1.3em;
	}

	.informeNorte .informe-item strong {
		display: block;
		width: auto;
		margin-bottom: 5px;
	}

	.informeNorte .block-container {
		margin-left: 1em;
	}

	.informa-results-table {
		font-size: 13px;
	}

	.informa-results-table th,
	.informa-results-table td {
		padding: 8px;
	}

	.table-balance {
		font-size: 12px;
	}

	.table-balance th,
	.table-balance td {
		padding: 6px 8px;
	}
}
