Feat Front Widgets Refactizados y Ajustes Backend
This commit is contained in:
		
							
								
								
									
										125
									
								
								Elecciones-Web/frontend/src/components/MapaBsAs.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								Elecciones-Web/frontend/src/components/MapaBsAs.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,125 @@ | ||||
| /* src/components/MapaBsAs.css */ | ||||
| :root { | ||||
|   --primary-accent-color: #FF5722; | ||||
|   --background-panel-color: #2f2f2f; | ||||
|   --border-color: #444; | ||||
|   --text-color: #f0f0f0; | ||||
|   --text-color-muted: #aaa; | ||||
|   --progress-bar-background: #4a4a4a; | ||||
|   --scrollbar-thumb-color: #666; | ||||
|   --scrollbar-track-color: #333; | ||||
|   --map-background-color: #242424; /* Color de fondo del mapa */ | ||||
| } | ||||
|  | ||||
| .mapa-wrapper { | ||||
|   display: flex; | ||||
|   gap: 1.5rem; | ||||
|   background-color: var(--map-background-color); | ||||
|   padding: 1rem; | ||||
|   border-radius: 12px; | ||||
|   max-width: 1600px; /* Incrementado para pantallas más grandes */ | ||||
|   margin: auto; | ||||
|   height: 88vh; /* Ligeramente más alto */ | ||||
|   min-height: 650px; | ||||
| } | ||||
|  | ||||
| .mapa-container { | ||||
|   flex: 0 0 70%; | ||||
|   height: 100%; | ||||
|   border: 1px solid var(--border-color); | ||||
|   border-radius: 8px; | ||||
|   position: relative; | ||||
|   overflow: hidden; | ||||
|   /* CORRECCIÓN: Se añade el color de fondo para eliminar el marco blanco */ | ||||
|   background-color: var(--map-background-color); | ||||
| } | ||||
|  | ||||
| .mapa-container .rsm-svg { | ||||
|   position: absolute; | ||||
|   top: 0; | ||||
|   left: 0; | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
| } | ||||
|  | ||||
| .rsm-geography { | ||||
|   transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out, filter 0.2s ease-in-out, fill 0.3s ease; | ||||
|   cursor: pointer; | ||||
|   stroke-width: 1px; | ||||
| } | ||||
|  | ||||
| .rsm-geography:hover { | ||||
|   filter: drop-shadow(0px 0px 6px rgba(255, 255, 255, 0.6)); | ||||
|   transform: translateY(-1px); | ||||
|   stroke-width: 1.5px; | ||||
| } | ||||
|  | ||||
| .rsm-geography.selected { | ||||
|   fill: var(--primary-accent-color); /* Rellena el partido seleccionado con el color principal */ | ||||
|   stroke: #ffffff; /* Añade un borde blanco para un mejor contraste */ | ||||
|   stroke-width: 2px; /* Un grosor de borde definido */ | ||||
|   filter: none; /* Elimina el efecto de sombra/resplandor */ | ||||
|   outline: none; /* Previene el recuadro de enfoque del navegador */ | ||||
|   pointer-events: none; /* Mantenemos esto para evitar interacciones no deseadas */ | ||||
| } | ||||
|  | ||||
| .rsm-geography.faded { | ||||
|   opacity: 0.15; | ||||
|   pointer-events: none; | ||||
| } | ||||
|  | ||||
| .info-panel { | ||||
|   flex: 1; | ||||
|   height: 100%; | ||||
|   background-color: var(--background-panel-color); | ||||
|   border-radius: 8px; | ||||
|   display: flex; | ||||
|   flex-direction: column; | ||||
|   overflow-y: auto; | ||||
|   padding: 1.5rem; | ||||
| } | ||||
|  | ||||
| .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: #888; } | ||||
| .info-panel h3 { margin-top: 0; color: var(--primary-accent-color); border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; } | ||||
| .info-panel p { color: var(--text-color-muted); } | ||||
|  | ||||
| .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; | ||||
| } | ||||
| .reset-button-panel:hover { background-color: var(--primary-accent-color); color: white; } | ||||
|  | ||||
| .detalle-placeholder { text-align: center; margin: auto; } | ||||
| .detalle-loading, .detalle-error { text-align: center; margin: auto; color: var(--text-color-muted); } | ||||
| .detalle-metricas { display: flex; justify-content: space-between; font-size: 0.9em; 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: 1rem; } | ||||
| .resultado-info { display: flex; justify-content: space-between; margin-bottom: 0.25rem; font-size: 0.9em; } | ||||
| .partido-nombre { font-weight: 500; } | ||||
| .partido-votos { font-weight: 300; color: var(--text-color-muted); } | ||||
| .progress-bar { height: 8px; background-color: var(--progress-bar-background); border-radius: 4px; overflow: hidden; } | ||||
| .progress-fill { height: 100%; background-color: var(--primary-accent-color); border-radius: 4px; 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; /* <-- AÑADIDO: Esta línea asegura que los controles estén por encima del mapa. */ | ||||
| } | ||||
| .map-controls button { | ||||
|   width: 32px; height: 32px; font-size: 1.2rem; font-weight: bold; background-color: rgba(0, 0, 0, 0.7); color: white; border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; | ||||
| } | ||||
| .map-controls button:hover { background-color: rgba(0, 0, 0, 0.9); border-color: var(--primary-accent-color); } | ||||
|  | ||||
| .legend { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border-color); } | ||||
| .legend h4 { margin-top: 0; } | ||||
| .legend-item { display: flex; align-items: center; margin-bottom: 0.5rem; font-size: 0.85em; } | ||||
| .legend-color-box { width: 16px; height: 16px; margin-right: 8px; border-radius: 3px; } | ||||
		Reference in New Issue
	
	Block a user