324 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			CSS
		
	
	
	
	
	
			
		
		
	
	
			324 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			CSS
		
	
	
	
	
	
| /* src/components/MapaBsAs.css */
 | |
| :root {
 | |
|   --primary-accent-color: #0073e6;
 | |
|   --background-panel-color: #ffffff;
 | |
|   --border-color: #dee2e6;
 | |
|   --text-color: #212529;
 | |
|   --text-color-muted: #6c757d;
 | |
|   --progress-bar-background: #e9ecef;
 | |
|   --scrollbar-thumb-color: #ced4da;
 | |
|   --scrollbar-track-color: #f1f1f1;
 | |
|   --map-background-color: #f8f9fa;
 | |
| }
 | |
| 
 | |
| .mapa-wrapper {
 | |
|   display: flex;
 | |
|   gap: 1.5rem;
 | |
|   background-color: #ffffff;
 | |
|   border: 1px solid var(--border-color);
 | |
|   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
 | |
|   padding: 1rem;
 | |
|   border-radius: 8px;
 | |
|   max-width: 960px;
 | |
|   margin: auto;
 | |
|   height: 88vh;
 | |
|   min-height: 650px;
 | |
|   font-size: 14px; 
 | |
| }
 | |
| 
 | |
| .mapa-container {
 | |
|   flex: 0 0 70%;
 | |
|   height: 100%;
 | |
|   border: 1px solid var(--border-color);
 | |
|   border-radius: 8px;
 | |
|   position: relative;
 | |
|   overflow: hidden;
 | |
|   background-color: var(--map-background-color);
 | |
| }
 | |
| 
 | |
| .mapa-container .rsm-svg {
 | |
|   position: absolute;
 | |
|   top: 0;
 | |
|   left: 0;
 | |
|   width: 100%;
 | |
|   height: 100%;
 | |
| }
 | |
| 
 | |
| /* APLICA LA TRANSICIÓN POR DEFECTO A ZOOMABLEGROUP */
 | |
| .mapa-container .rsm-zoomable-group {
 | |
|   transition: transform 400ms ease-in-out;
 | |
| }
 | |
| 
 | |
| /* DESACTIVA LA TRANSICIÓN CUANDO SE ESTÁ ARRASTRANDO */
 | |
| .mapa-container .rsm-zoomable-group.panning {
 | |
|   transition: none;
 | |
| }
 | |
| 
 | |
| .rsm-geography {
 | |
|   transition: opacity 0.3s ease, transform 0.2s ease, filter 0.2s ease, fill 0.3s ease;
 | |
|   cursor: pointer;
 | |
|   stroke: #b0b0b0;
 | |
|   stroke-width: 0.5px;
 | |
| }
 | |
| 
 | |
| .rsm-geography:hover {
 | |
|   stroke: var(--primary-accent-color);
 | |
|   stroke-width: 1.5px;
 | |
|   filter: brightness(1.05);
 | |
| }
 | |
| 
 | |
| .rsm-geography.selected {
 | |
|   stroke: #333;
 | |
|   stroke-width: 2px;
 | |
|   filter: none;
 | |
|   pointer-events: none;
 | |
| }
 | |
| 
 | |
| .rsm-geography.faded {
 | |
|   opacity: 0.25;
 | |
|   pointer-events: none;
 | |
| }
 | |
| 
 | |
| .info-panel {
 | |
|   flex: 1;
 | |
|   display: flex;
 | |
|   flex-direction: column;
 | |
|   overflow-y: auto;
 | |
|   min-height: 0;
 | |
|   background-color: var(--background-panel-color);
 | |
|   border-radius: 8px;
 | |
|   padding: 1rem;
 | |
|   border: none;
 | |
|   font-size: 1em;
 | |
| }
 | |
| 
 | |
| .info-panel::-webkit-scrollbar { width: 8px; }
 | |
| .info-panel::-webkit-scrollbar-track { background: var(--scrollbar-track-color); border-radius: 4px; }
 | |
| .info-panel::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb-color); border-radius: 4px; border: 2px solid var(--scrollbar-track-color); }
 | |
| .info-panel::-webkit-scrollbar-thumb:hover { background-color: #adb5bd; }
 | |
| 
 | |
| .info-panel h3 {
 | |
|   margin-top: 0;
 | |
|   color: var(--primary-accent-color);
 | |
|   border-bottom: 2px solid var(--border-color);
 | |
|   padding-bottom: 0.5rem;
 | |
|   font-size: 1.25rem;
 | |
| }
 | |
| 
 | |
| .info-panel p {
 | |
|   color: var(--text-color-muted);
 | |
|   font-size: 0.9rem;
 | |
| }
 | |
| 
 | |
| .reset-button-panel {
 | |
|   background: none; border: 1px solid var(--primary-accent-color); color: var(--primary-accent-color); padding: 0.5rem 1rem; border-radius: 5px; cursor: pointer; transition: all 0.2s; margin-bottom: 1rem; align-self: flex-start; font-size: 0.9rem;
 | |
| }
 | |
| .reset-button-panel:hover { background-color: var(--primary-accent-color); color: white; }
 | |
| 
 | |
| .detalle-placeholder { 
 | |
|   text-align: center; 
 | |
|   margin: auto 0; 
 | |
| }
 | |
| .detalle-loading, .detalle-error { text-align: center; margin: auto 0; color: var(--text-color-muted); }
 | |
| .detalle-metricas {
 | |
|   display: flex;
 | |
|   justify-content: space-between;
 | |
|   font-size: 0.9rem;
 | |
|   padding-bottom: 1rem;
 | |
|   border-bottom: 1px solid var(--border-color);
 | |
|   margin-bottom: 1rem;
 | |
| }
 | |
| .resultados-lista {
 | |
|   list-style: none;
 | |
|   padding: 0;
 | |
|   margin: 0;
 | |
| }
 | |
| .resultados-lista li {
 | |
|   margin-bottom: 1.1rem; 
 | |
| }
 | |
| .resultado-info {
 | |
|   display: flex;
 | |
|   justify-content: space-between;
 | |
|   align-items: baseline;
 | |
|   margin-bottom: 0.35rem;
 | |
|   font-size: 0.9rem;
 | |
| }
 | |
| 
 | |
| .partido-nombre {
 | |
|   font-weight: 500;
 | |
|   color: #343a40;
 | |
|   white-space: nowrap; 
 | |
|   overflow: hidden;
 | |
|   text-overflow: ellipsis;
 | |
|   padding-right: 1.5rem; 
 | |
| }
 | |
| 
 | |
| .partido-votos {
 | |
|   font-weight: 400;
 | |
|   color: var(--text-color-muted);
 | |
|   text-align: right;
 | |
|   white-space: nowrap;
 | |
|   flex-shrink: 0;
 | |
| }
 | |
| 
 | |
| .progress-bar {
 | |
|   height: 6px;
 | |
|   background-color: var(--progress-bar-background);
 | |
|   border-radius: 3px;
 | |
|   overflow: hidden;
 | |
| }
 | |
| .progress-fill {
 | |
|   height: 100%;
 | |
|   background-color: var(--primary-accent-color);
 | |
|   border-radius: 3px;
 | |
|   transition: width 0.5s ease-out;
 | |
| }
 | |
| 
 | |
| .spinner { width: 40px; height: 40px; border: 4px solid var(--border-color); border-top-color: var(--primary-accent-color); border-radius: 50%; animation: spin 1s linear infinite; margin: 1rem auto; }
 | |
| @keyframes spin { to { transform: rotate(360deg); } }
 | |
| 
 | |
| .map-controls {
 | |
|   position: absolute;
 | |
|   top: 15px;
 | |
|   right: 15px;
 | |
|   display: flex;
 | |
|   flex-direction: column;
 | |
|   gap: 5px;
 | |
|   z-index: 10;
 | |
| }
 | |
| 
 | |
| /* --- ESTILOS PARA EL BOTÓN DE "VOLVER" (VISTA DESKTOP) --- */
 | |
| .map-controls button {
 | |
|   /* Se elimina el ancho y alto fijos para que el botón se ajuste al texto. */
 | |
|   width: auto;
 | |
|   height: auto;
 | |
|   /* Se define un padding para dar espacio interno al texto. */
 | |
|   padding: 0.5rem 1rem;
 | |
|   /* Se ajusta el tamaño de fuente para el texto. */
 | |
|   font-size: 0.9rem;
 | |
|   font-weight: bold;
 | |
|   background-color: #ffffff;
 | |
|   color: #333;
 | |
|   border: 1px solid var(--border-color);
 | |
|   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
 | |
|   border-radius: 4px;
 | |
|   cursor: pointer;
 | |
|   transition: all 0.2s;
 | |
|   /* Se eliminan las propiedades de centrado de íconos que ya no son necesarias. */
 | |
| }
 | |
| .map-controls button:hover {
 | |
|   background-color: #f8f9fa;
 | |
|   border-color: var(--primary-accent-color);
 | |
|   color: var(--primary-accent-color);
 | |
| }
 | |
| 
 | |
| .legend {
 | |
|   padding-top: 1rem;
 | |
|   border-top: 1px solid var(--border-color);
 | |
| }
 | |
| .legend h4 {
 | |
|   margin-top: 0;
 | |
|   margin-bottom: 0.75rem;
 | |
|   font-size: 1rem; 
 | |
| }
 | |
| 
 | |
| #root .legend h4 {
 | |
|   font-size: 1.15rem;
 | |
| }
 | |
| 
 | |
| .legend-item {
 | |
|   display: flex;
 | |
|   align-items: center;
 | |
|   margin-bottom: 0.35rem; 
 | |
|   font-size: 0.75rem;
 | |
| }
 | |
| .legend-color-box { width: 16px; height: 16px; margin-right: 8px; border-radius: 3px; border: 1px solid #ccc; }
 | |
| 
 | |
| /* --- ESTILOS PARA RESPONSIVIDAD MÓVIL --- */
 | |
| @media (max-width: 992px) {
 | |
|   .mapa-wrapper {
 | |
|     flex-direction: column;
 | |
|     height: auto;
 | |
|     min-height: 100vh;
 | |
|     padding: 0.5rem;
 | |
|   }
 | |
| 
 | |
|   .mapa-container {
 | |
|     flex-basis: auto;
 | |
|     width: 100%;
 | |
|     height: 50vh;
 | |
|     min-height: 400px;
 | |
|   }
 | |
| 
 | |
|   .info-panel {
 | |
|     flex-basis: auto;
 | |
|     width: 100%;
 | |
|     height: auto;
 | |
|     overflow-y: visible;
 | |
|     box-sizing: border-box;
 | |
|   }
 | |
| 
 | |
|   .map-controls {
 | |
|     top: 10px;
 | |
|     right: 10px;
 | |
|   }
 | |
| 
 | |
|   /* --- ESTILOS PARA EL BOTÓN DE "VOLVER" (VISTA MÓVIL) --- */
 | |
|   .map-controls button {
 | |
|     /* Se elimina el ancho y alto fijos para que el botón se ajuste al texto. */
 | |
|     width: auto;
 | |
|     height: auto;
 | |
|     /* Se ajusta el padding para que sea un buen objetivo táctil (tappable). */
 | |
|     padding: 0.6rem 1.2rem;
 | |
|     /* Un tamaño de fuente legible en móviles. */
 | |
|     font-size: 1rem;
 | |
|   }
 | |
| }
 | |
| 
 | |
| /* --- ESTILOS PARA EL SELECTOR DE CATEGORÍA --- */
 | |
| .mapa-categoria-selector {
 | |
|   display: flex;
 | |
|   margin-bottom: 1.5rem;
 | |
| }
 | |
| 
 | |
| .mapa-categoria-combobox {
 | |
|   width: 100%;
 | |
|   padding: 0.75rem 1rem;
 | |
|   font-size: 1rem;
 | |
|   font-weight: 500;
 | |
|   color: var(--text-color);
 | |
|   background-color: #f8f9fa;
 | |
|   border: 1px solid var(--border-color);
 | |
|   border-radius: 6px;
 | |
|   cursor: pointer;
 | |
|   appearance: none;
 | |
|   background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230073e6%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.9z%22%2F%3E%3C%2Fsvg%3E');
 | |
|   background-repeat: no-repeat;
 | |
|   background-position: right 1rem center;
 | |
|   background-size: 0.8em;
 | |
|   transition: all 0.2s ease-in-out;
 | |
| }
 | |
| 
 | |
| .mapa-categoria-combobox:hover {
 | |
|   border-color: var(--primary-accent-color);
 | |
|   background-color: #e9ecef;
 | |
| }
 | |
| 
 | |
| .mapa-categoria-combobox:focus {
 | |
|   outline: none;
 | |
|   border-color: var(--primary-accent-color);
 | |
|   box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.25);
 | |
| }
 | |
| 
 | |
| /* --- ESTILOS PARA SECCIONES NO CLICLEABLES --- */
 | |
| .rsm-geography.no-results {
 | |
|     pointer-events: none; /* Ignora todos los eventos del ratón (click, hover, etc.) */
 | |
|     cursor: default;      /* Muestra el cursor por defecto en lugar de la mano */
 | |
| }
 | |
| 
 | |
| /* Opcional pero recomendado: modificar la regla :hover para que no afecte a las secciones no clicleables */
 | |
| .rsm-geography:not(.no-results):hover {
 | |
|     stroke: var(--primary-accent-color);
 | |
|     stroke-width: 1.5px;
 | |
|     filter: brightness(1.05);
 | |
| } |