/* Estilos extraídos desde el template tres-ta-en-cifras-public-display.php */

/* Banner que escapa del contenedor de WordPress */
.banner-cifras {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	left: 0;
	right: 0;
}

/* Altura completa para las columnas de infographic-2025 */
.infographic-2025 > [class*="col-"] {
	min-height: 100vh !important; /* Altura mínima del viewport */
	height: auto !important; /* Altura automática según contenido */
	overflow-x: hidden; /* Sin scroll horizontal */
	transition: none; /* Sin transición en cambios de clase para evitar layout shift */
}

/* Prevenir layout shift durante navegación */
#infoTribunal > .col-md-3,
#data-column {
	will-change: auto;
	backface-visibility: hidden;
	transform: translateZ(0); /* Forzar aceleración por hardware */
}

/* Asegurar que la columna izquierda esté completamente oculta en página 7 */
#infoTribunal.sheet-7 > .col-md-3 {
	display: none !important;
	width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Asegurar que la columna central ocupe el espacio correcto en página 7 sin layout shift */
#infoTribunal.sheet-7 #data-column.col-md-10 {
	flex: 0 0 83.33333333%;
	max-width: 83.33333333%;
}

/* En móviles, la columna debe ser de ancho completo (col-12) */
@media (max-width: 767.98px) {
	#infoTribunal.sheet-7 #data-column.col-12 {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* Prevenir layout shift en el contenedor principal */
#infoTribunal {
	position: relative;
}

/* Ajustar min-height para página 7 - igual que las demás */
#infoTribunal.sheet-7 #data-column {
	min-height: 500px !important;
}

/* Ajustar el mapa territorial para que no necesite scroll */
.infographic-2025 .col-md-3 {
	overflow-y: visible !important; /* Sin scroll, el contenido expande el div */
}

#map-chile {
	width: 100%;
	height: auto;
	max-height: 125vh; /* Máximo del viewport */
}

.map-wrapper {
	width: 100%;
	height: auto;
	max-height: 80vh;
	overflow: hidden;
}

/* Colores azules para el título y elementos del mapa - mismo color del router */
#infoTribunal .col-md-3 h5 {
	color: #23478d !important; /* Azul del router/navegación */
}

/* Botones de región */
#infoTribunal .col-md-3 .map-options a,
#infoTribunal .col-md-3 button,
#infoTribunal .col-md-3 .btn {
	color: #23478d !important;
}

/* Título de región seleccionada */
#region_titulo {
	color: #23478d !important;
}

/* Texto general del área del mapa */
#infoTribunal .col-md-3 p,
#infoTribunal .col-md-3 span,
#infoTribunal .col-md-3 label {
	color: #23478d !important;
}

/* Enlaces en el área del mapa */
#infoTribunal .col-md-3 a {
	color: #23478d !important;
}

#infoTribunal .col-md-3 a:hover {
	color: #1a3567 !important; /* Azul más oscuro en hover */
}

/* Ocultar contadores de caracteres que se están mostrando como "10" en los filtros */
#tres-ta-app .character-counter {
	display: none !important;
}

/* Inputs de fecha a ancho completo en buscador de Componente Ambiental */
#componente-ambiental-search input[type="date"] {
	width: 100% !important;
}

/* Ajustar bordes cuando la columna central pasa a col-md-10 en Componente Ambiental */
.infographic-2025 > .col-md-10 {
	border-left: 1px solid #e0e0e0;
	border-right: 1px solid #e0e0e0;
}

/* Ajuste de bullets en intro */
.wrap-cifras-intro ul li::before {
	display: none !important;
	content: none !important;
}

/* Layout para hoja 7 - Componente Ambiental */
#componente-ambiental-table {
	padding-left: 20px;
	padding-right: 20px;
}

/* Estilos para la tabla de Componente Ambiental */
.table-responsive-wrapper {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch; /* Smooth scrolling en iOS */
	margin-bottom: 20px;
}

.table-componente {
	width: 100%;
	min-width: 800px; /* Ancho mínimo para evitar que se comprima demasiado */
	border-collapse: collapse;
	background-color: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-componente thead {
	background-color: #2E5A8C;
	color: #fff;
}

.table-componente thead th {
	padding: 15px 12px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
	border-bottom: 2px solid #1a3d63;
}

.table-componente tbody tr {
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s;
}

.table-componente tbody tr:hover {
	background-color: #f5f8fa;
}

.table-componente tbody td {
	padding: 12px;
	font-size: 13px;
	color: #333;
	vertical-align: middle;
}

.table-componente tbody td:first-child {
	font-weight: 600;
	color: #2E5A8C;
}

.table-componente .instrumento-link {
	color: #2E5A8C;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-weight: 500;
	width: 100%;
}

.table-componente .instrumento-link:hover {
	color: #1a3d63;
}

.table-componente .instrumento-link .icon-button {
	background-color: #2E5A8C;
	color: white;
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
	cursor: pointer;
	margin-left: auto;
	flex-shrink: 0;
}

.table-componente .instrumento-link:hover .icon-button {
	background-color: #1a3d63;
}

.table-componente .instrumento-link .icon-button i {
	font-size: 14px;
	line-height: 1;
	display: block;
}

/* Estilos para link de componente ambiental (con lupa) */
.table-componente .componente-ambiental-link {
	color: #2E5A8C;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-weight: 500;
	width: 100%;
}

.table-componente .componente-ambiental-link:hover {
	color: #1a3d63;
}

.table-componente .componente-ambiental-link .icon-button {
	background-color: #2E5A8C;
	color: white;
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
	cursor: pointer;
	margin-left: auto;
	flex-shrink: 0;
}

.table-componente .componente-ambiental-link:hover .icon-button {
	background-color: #1a3d63;
}

.table-componente .componente-ambiental-link .icon-button i {
	font-size: 14px;
	line-height: 1;
	display: block;
}

/* Paginación de tabla */
.table-pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15px;
	padding: 10px 0;
}

.table-pagination .pagination-info {
	color: #666;
	font-size: 14px;
}

.table-pagination .pagination-controls button {
	background-color: #2E5A8C;
	color: #fff;
	border: none;
	padding: 8px 15px;
	margin: 0 3px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
}

.table-pagination .pagination-controls button:hover {
	background-color: #1a3d63;
}

.table-pagination .pagination-controls button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

/* Media queries para responsive tabla componente ambiental */
@media (max-width: 768px) {
	#componente-ambiental-table {
		padding-left: 10px;
		padding-right: 10px;
	}

	.table-componente {
		min-width: 700px; /* Un poco más pequeño en tablets */
	}

	.table-componente thead th,
	.table-componente tbody td {
		padding: 10px 8px;
		font-size: 12px;
	}

	.table-pagination {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}
}

@media (max-width: 576px) {
	#componente-ambiental-table {
		padding-left: 5px;
		padding-right: 5px;
	}

	.table-componente {
		min-width: 600px; /* Más pequeño en móviles */
	}

	.table-componente thead th,
	.table-componente tbody td {
		padding: 8px 6px;
		font-size: 11px;
	}

	.table-componente .instrumento-link .icon-button,
	.table-componente .componente-ambiental-link .icon-button {
		width: 24px;
		height: 24px;
		min-width: 24px;
		min-height: 24px;
	}
	
	.table-componente .instrumento-link .icon-button i,
	.table-componente .componente-ambiental-link .icon-button i {
		font-size: 12px;
	}

	.table-pagination .pagination-controls button {
		padding: 6px 10px;
		font-size: 12px;
	}
}

/* Modal Tema Específico - estilo tipo tarjeta limpio (scope específico) */
.modal-componente-ambiental {
	display: none !important;
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	background-color: transparent !important; /* sin overlay oscuro */
	z-index: 99999 !important;
	pointer-events: none !important; /* el contenedor no captura clics */
}

.modal-componente-ambiental.show {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.modal-componente-ambiental-dialog {
	background-color: #ffffff !important;
	border-radius: 10px !important;
	max-width: 520px !important;
	width: 90% !important;
	max-height: 80vh !important;
	overflow-y: auto !important;
	box-shadow: 0 8px 24px rgba(0,0,0,0.25) !important;
	margin: 20px !important;
	pointer-events: auto !important; /* solo la caja del modal es interactiva */
	font-family: inherit !important;
}

.modal-componente-ambiental-header {
	padding: 16px 24px !important;
	border-bottom: 1px solid #e0e0e0 !important;
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	background-color: #ffffff !important;
}

.modal-componente-ambiental-title {
	font-size: 20px !important;
	font-weight: 600 !important;
	margin: 0 !important;
	color: #333333 !important;
}

.modal-componente-ambiental-close {
	background: transparent !important;
	border: none !important;
	font-size: 20px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	opacity: 0.6 !important;
	padding: 0 !important;
	width: 32px !important;
	height: 32px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.modal-componente-ambiental-close:hover {
	opacity: 1 !important;
	background-color: #f2f2f2 !important;
	border-radius: 50% !important;
}

.modal-componente-ambiental-body {
	padding: 20px 24px 24px 24px !important;
	color: #4a4a4a !important;
	background-color: #ffffff !important;
	font-size: 15px !important;
	line-height: 1.6 !important;
}

.modal-componente-ambiental-body p {
	margin-bottom: 10px !important;
}

.modal-componente-ambiental-body p strong {
	font-weight: 600 !important;
	color: #333333 !important;
}

.modal-componente-ambiental-footer {
	padding: 12px 24px 16px 24px !important;
	border-top: 1px solid #e0e0e0 !important;
	display: flex !important;
	justify-content: flex-end !important;
	gap: 0.5rem !important;
	background-color: #ffffff !important;
}

.modal-componente-ambiental-btn-secondary {
	background-color: #ffffff !important;
	color: #23478d !important;
	border: 1px solid #23478d !important;
	padding: 8px 28px !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 500 !important;
}

.modal-componente-ambiental-btn-secondary:hover {
	background-color: #23478d !important;
	color: #ffffff !important;
}

body.modal-open {
	overflow: hidden;
}

/* Estilos para el componente de notas colapsable */
#msg-info {
	margin-top: 20px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

#titlemsg-info {
	width: 100%;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	transition: all 0.3s ease;
}

#titlemsg-info:hover {
	background-color: #e9ecef;
}

#titlemsg-info span {
	font-weight: 600;
	font-size: 15px;
	color: #333;
}

#titlemsg-info i {
	color: #666;
	transition: transform 0.3s ease;
}

#collapseMsg {
	display: none;
	overflow: hidden;
	height: 0; /* Sin altura cuando está colapsado */
	transition: height 0.3s ease;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

#collapseMsg.in {
	display: block;
	height: auto; /* Altura automática cuando está expandido */
}

#collapseMsg .card {
	border: 1px solid #dee2e6;
	border-top: none;
	border-radius: 0 0 8px 8px;
	margin: 0; /* Sin margen cuando está colapsado */
}

#collapseMsg .card-body {
	padding: 20px;
	background-color: #fff;
	font-size: 14px;
	line-height: 1.8;
	color: #555;
	overflow-x: hidden; /* Sin scroll horizontal */
	word-wrap: break-word; /* Romper palabras largas */
	overflow-wrap: break-word; /* Compatibilidad */
	text-align: justify;
}

#collapseMsg .card-body p {
	margin-bottom: 10px;
}

#collapseMsg .card-body p:last-child {
	margin-bottom: 0;
}

/* Stroke del mapa - bordes de las regiones */
#map-chile .RG-MAP {
	stroke: #23478d !important;
	transition: all 0.3s ease;
}

/* Estado hover del mapa - mismo color que active, contenido DENTRO de la región (sin desbordes) */
#map-chile .RG.hover .RG-MAP {
	fill: #3d6ba8 !important; /* Mismo color que selected/active */
	fill-opacity: 0.35 !important; /* Misma opacidad que selected */
	/* Borde iluminado con el mismo color */
	stroke: #3d6ba8 !important;
	stroke-width: 1.5px !important; /* Borde un poco más visible */
	stroke-opacity: 0.6 !important;
	transition: all 0.15s ease;
	/* Asegurar que el fill se renderice primero y quede dentro */
	paint-order: fill stroke markers;
}

/* Estado selected del mapa - contenido DENTRO de la región (sin desbordes) */
#map-chile .RG.selected .RG-MAP {
	fill: #3d6ba8 !important; /* Azul medio, menos intenso */
	fill-opacity: 0.35 !important; /* Solo fill, contenido dentro */
	/* Mantener stroke original pero más sutil */
	stroke: #3d6ba8 !important;
	stroke-width: 1px !important;
	stroke-opacity: 0.5 !important;
	transition: all 0.15s ease;
	/* Asegurar que el fill se renderice primero y quede dentro */
	paint-order: fill stroke markers;
}

/* Combinación hover + selected - contenido DENTRO de la región (sin desbordes) */
#map-chile .RG.selected.hover .RG-MAP {
	fill: #2d5a8f !important; /* Azul un poco más oscuro pero no tan fuerte */
	fill-opacity: 0.45 !important; /* Solo fill, contenido dentro */
	/* Mantener stroke original pero más sutil */
	stroke: #2d5a8f !important;
	stroke-width: 1.5px !important;
	stroke-opacity: 0.6 !important;
	transition: all 0.15s ease;
	/* Asegurar que el fill se renderice primero y quede dentro */
	paint-order: fill stroke markers;
}

/* Asegurar que los efectos no se desborden fuera de la región */
#map-chile .RG {
	/* El SVG recortará automáticamente el contenido al viewBox */
	overflow: visible;
}

#map-chile {
	/* El contenedor SVG debe mantener los límites */
	overflow: visible;
}

/* Líneas del mapa */
#map-chile .RG-LINE {
	stroke: #234da3ab !important;
	fill: #23478d !important;
}

/* Títulos/texto de las regiones en el mapa */
#map-chile .RG-TITLE {
	fill: #2f3c5763 !important; /* Color de relleno del texto */
}

/* Texto dentro de los títulos (tspan) */
#map-chile .RG-TITLE tspan {
	fill: #2850a3 !important;
}

.section-buscador {
	margin-bottom: 20px;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
	display: none;
}

.section-buscador.active {
	display: block;
}

.section-buscador h6 {
	margin: 0 0 15px 0;
	font-weight: 600;
	color: #333;
}

.section-buscador .row {
	margin: 0 -8px;
}

.section-buscador .col-md-6 {
	padding: 0 8px;
}

.section-summary {
	margin-bottom: 20px;
	display: flex;
	justify-content: flex-start;
}

.summary-card {
	width: 100%;
	max-width: 980px;
	padding: 16px 20px;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 8px;
}

.summary-card .summary-item {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	font-size: 18px;
	font-weight: 700;
	width: 100%;
	text-align: left;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.summary-card .summary-item .label {
	opacity: 0.95;
}

.summary-card .summary-item .value {
	font-weight: 700;
	font-size: 18px;
}

.summary-card .separator {
	display: none;
}

.section-card-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	width: 100%;
}

.section-card {
	width: 100%;
	padding: 18px;
	border-radius: 10px;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #4c4c4c;
	text-align: center;
}

.section-card strong {
	font-size: 36px;
}

.section-card small {
	font-size: 12px;
	opacity: 0.8;
}

.notas-tabla {
	margin-top: 30px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.notas-tabla .accordion-item {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
}

.notas-tabla .accordion-button {
	background-color: #f8f9fa;
	color: #333;
	font-weight: 600;
	font-size: 15px;
	padding: 15px 20px;
	border: none;
}

.notas-tabla .accordion-button:not(.collapsed) {
	background-color: #e9ecef;
	color: #000;
	box-shadow: none;
}

.notas-tabla .accordion-button:focus {
	box-shadow: none;
	border-color: transparent;
}

.notas-tabla .accordion-button::after {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.notas-tabla .accordion-body {
	padding: 20px;
	background-color: #fff;
	font-size: 14px;
	line-height: 1.8;
	border-top: 1px solid #dee2e6;
	overflow-x: hidden; /* Sin scroll horizontal */
	word-wrap: break-word; /* Romper palabras largas */
	overflow-wrap: break-word; /* Compatibilidad */
	box-sizing: border-box;
	text-align: justify;
}

.notas-tabla .accordion-body ul {
	list-style-type: disc;
	margin-bottom: 0;
}

.notas-tabla .accordion-body li {
	color: #555;
	margin-bottom: 8px;
}

.notas-tabla .accordion-body li:last-child {
	margin-bottom: 0;
}

.notas-tabla .accordion-body p {
	margin: 0;
}

/* Control de visibilidad de filtros de categoría - sin estilos adicionales */
.category-filters {
	display: none;
	margin: 17px 17px;
}

.category-filters.active {
	display: block;
}

/* Bloqueo de scroll mientras se cargan secciones */
html.tres-ta-loading,
body.tres-ta-loading {
	overflow: hidden !important;
}

/* Etiqueta flotante solo para los spans del nav lateral del plugin - flota a nivel de contenedor */
.nav-cifras {
	position: relative;
}

.nav-cifras li {
	position: relative;
}

/* Asegurar que los contenedores padres permitan overflow visible solo para estos spans */
#tres-ta-app,
.infographic-2025,
.infographic-2025 .col-md-2 {
	overflow: visible !important;
}

.nav-cifras .mod-cat-title-3ta {
	position: fixed;
	white-space: nowrap;
	background: #ffffff;
	color: #1a3d63;
	border: 2px solid #1a3d63;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 12px;
	line-height: 1.4;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 99999;
	transform: translate(8px, -50%);
}

.nav-cifras li a:hover .mod-cat-title-3ta {
	opacity: 1 !important;
	transform: translate(12px, -50%);
}

/* (nav-cifras) se deja como en el tema original; estilos específicos del tooltip custom eliminados */

/* Ocultar gráfico en móviles */
@media (max-width: 767.98px) {
	.tres-ta-chart-wrapper,
	#tres-ta-chart {
		display: none !important;
	}
	
	.stats-numbers-graphic .row > .col-md-12:first-child {
		display: none !important;
	}
	
	/* Stats Numbers Cards - Columna en móvil */
	.stats-numbers {
		width: 100%;
	}
	
	.stats-numbers-cards {
		display: flex !important;
		flex-direction: column !important;
		gap: 16px !important;
		width: 100% !important;
	}
	
	.stats-numbers-cards .stat-card {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
	}
	
	/* Stats Categories - Solo ocultar el título en móvil */
	.stats-categories .stat-cat-title {
		display: none !important;
	}
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 575.98px) {
	.stats-numbers-cards {
		gap: 12px !important;
	}
}



