327 lines
6.8 KiB
CSS
327 lines
6.8 KiB
CSS
|
|
/* src/features/legislativas/nacionales/PanelNaciona.css */
|
||
|
|
.panel-nacional-container {
|
||
|
|
font-family: 'Roboto', sans-serif;
|
||
|
|
max-width: 1200px;
|
||
|
|
margin: auto;
|
||
|
|
border: 1px solid #e0e0e0;
|
||
|
|
border-radius: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.panel-header {
|
||
|
|
padding: 1rem 1.5rem;
|
||
|
|
border-bottom: 1px solid #e0e0e0;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Nuevo contenedor para alinear título y selector */
|
||
|
|
.header-top-row {
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
align-items: center;
|
||
|
|
margin-bottom: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.panel-header h1 {
|
||
|
|
font-size: 1.5rem;
|
||
|
|
margin: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.categoria-selector {
|
||
|
|
min-width: 220px;
|
||
|
|
/* Ancho del selector */
|
||
|
|
}
|
||
|
|
|
||
|
|
.breadcrumbs {
|
||
|
|
font-size: 0.9rem;
|
||
|
|
color: #666;
|
||
|
|
}
|
||
|
|
|
||
|
|
.breadcrumb-link {
|
||
|
|
background: none;
|
||
|
|
border: none;
|
||
|
|
color: #007bff;
|
||
|
|
cursor: pointer;
|
||
|
|
padding: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.breadcrumb-separator {
|
||
|
|
margin: 0 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.panel-main-content {
|
||
|
|
display: flex;
|
||
|
|
height: 75vh;
|
||
|
|
min-height: 500px;
|
||
|
|
transition: all 0.5s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Columna del mapa */
|
||
|
|
.mapa-column {
|
||
|
|
flex: 2; /* Por defecto, ocupa 2/3 del espacio */
|
||
|
|
position: relative;
|
||
|
|
transition: flex 0.5s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Columna de resultados */
|
||
|
|
.resultados-column {
|
||
|
|
flex: 1; /* Por defecto, ocupa 1/3 */
|
||
|
|
overflow-y: auto;
|
||
|
|
padding: 1.5rem;
|
||
|
|
transition: all 0.5s ease-in-out;
|
||
|
|
min-width: 320px; /* Un ancho mínimo para que no se comprima demasiado */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* --- NUEVOS ESTILOS --- */
|
||
|
|
.mapa-componente-container {
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mapa-volver-btn {
|
||
|
|
position: absolute;
|
||
|
|
top: 10px;
|
||
|
|
left: 10px;
|
||
|
|
z-index: 10;
|
||
|
|
padding: 8px 12px;
|
||
|
|
background-color: white;
|
||
|
|
border: 1px solid #ccc;
|
||
|
|
border-radius: 4px;
|
||
|
|
cursor: pointer;
|
||
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-fila {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
margin-bottom: 1rem;
|
||
|
|
gap: 1rem; /* Añade un espacio entre logo, info y stats */
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-logo {
|
||
|
|
flex-shrink: 0;
|
||
|
|
width: 48px;
|
||
|
|
height: 48px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-logo img {
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
object-fit: contain;
|
||
|
|
border-radius: 50%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-info-wrapper {
|
||
|
|
flex-grow: 1; /* Permite que esta sección crezca */
|
||
|
|
flex-shrink: 1; /* Permite que se encoja si es necesario */
|
||
|
|
min-width: 0; /* <-- TRUCO CLAVE DE FLEXBOX para que text-overflow funcione */
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-nombre {
|
||
|
|
font-weight: 500;
|
||
|
|
display: block;
|
||
|
|
white-space: nowrap; /* <-- No permitir que el texto salte de línea */
|
||
|
|
overflow: hidden; /* <-- Ocultar el texto que se desborda */
|
||
|
|
text-overflow: ellipsis; /* <-- Añadir "..." al final */
|
||
|
|
}
|
||
|
|
|
||
|
|
.candidato-nombre {
|
||
|
|
font-size: 0.85rem;
|
||
|
|
color: #666;
|
||
|
|
display: block;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-barra-background {
|
||
|
|
height: 15px;
|
||
|
|
background-color: #f0f0f0;
|
||
|
|
border-radius: 5px;
|
||
|
|
margin-top: 4px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-barra-foreground {
|
||
|
|
height: 100%;
|
||
|
|
border-radius: 4px;
|
||
|
|
transition: width 0.5s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-stats {
|
||
|
|
flex-shrink: 0; /* <-- MUY IMPORTANTE: Evita que este bloque se encoja */
|
||
|
|
text-align: right;
|
||
|
|
min-width: 100px; /* Asegura que siempre tenga espacio suficiente */
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-porcentaje {
|
||
|
|
font-size: 1.2rem;
|
||
|
|
font-weight: 700;
|
||
|
|
display: block;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-votos {
|
||
|
|
font-size: 0.8rem;
|
||
|
|
color: #666;
|
||
|
|
display: block;
|
||
|
|
}
|
||
|
|
|
||
|
|
.panel-estado-recuento {
|
||
|
|
margin-top: auto;
|
||
|
|
padding-top: 1rem;
|
||
|
|
border-top: 1px solid #e0e0e0;
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-around;
|
||
|
|
}
|
||
|
|
|
||
|
|
.estado-item {
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.estado-item span {
|
||
|
|
font-size: 0.8rem;
|
||
|
|
color: #666;
|
||
|
|
display: block;
|
||
|
|
}
|
||
|
|
|
||
|
|
.estado-item strong {
|
||
|
|
font-size: 1.2rem;
|
||
|
|
color: #333;
|
||
|
|
}
|
||
|
|
|
||
|
|
.rsm-zoomable-group {
|
||
|
|
transition: transform 0.75s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
* Contenedor principal del contenido */
|
||
|
|
.panel-main-content {
|
||
|
|
display: flex;
|
||
|
|
height: 70vh;
|
||
|
|
min-height: 500px;
|
||
|
|
transition: all 0.5s ease-in-out; /* Transición suave para el layout */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Columna del mapa */
|
||
|
|
.mapa-column {
|
||
|
|
flex: 2; /* Por defecto, ocupa 2/3 del espacio */
|
||
|
|
position: relative;
|
||
|
|
transition: flex 0.5s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Columna de resultados */
|
||
|
|
.resultados-column {
|
||
|
|
flex: 1; /* Por defecto, ocupa 1/3 */
|
||
|
|
overflow-y: auto;
|
||
|
|
padding: 1.5rem;
|
||
|
|
transition: all 0.5s ease-in-out;
|
||
|
|
min-width: 320px; /* Un ancho mínimo para que no se comprima demasiado */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* --- ESTADO COLAPSADO --- */
|
||
|
|
/* Cuando el panel principal tiene la clase 'panel-collapsed' */
|
||
|
|
.panel-main-content.panel-collapsed .mapa-column {
|
||
|
|
flex: 1 1 100%; /* El mapa ocupa todo el ancho */
|
||
|
|
}
|
||
|
|
|
||
|
|
.panel-main-content.panel-collapsed .resultados-column {
|
||
|
|
flex-basis: 0;
|
||
|
|
min-width: 0;
|
||
|
|
max-width: 0;
|
||
|
|
padding: 0;
|
||
|
|
overflow: hidden; /* Oculta el contenido para que no se desborde */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* --- Estilo del botón para colapsar --- */
|
||
|
|
.panel-toggle-btn {
|
||
|
|
position: absolute;
|
||
|
|
top: 50%;
|
||
|
|
right: 10px;
|
||
|
|
transform: translateY(-50%);
|
||
|
|
z-index: 10;
|
||
|
|
width: 30px;
|
||
|
|
height: 50px;
|
||
|
|
border: 1px solid #ccc;
|
||
|
|
background-color: white;
|
||
|
|
border-radius: 4px 0 0 4px;
|
||
|
|
cursor: pointer;
|
||
|
|
font-size: 1.5rem;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #555;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||
|
|
transition: background-color 0.2s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.panel-toggle-btn:hover {
|
||
|
|
background-color: #f0f0f0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.rsm-geography {
|
||
|
|
cursor: pointer;
|
||
|
|
stroke: #000000;
|
||
|
|
stroke-width: 0.2px;
|
||
|
|
outline: none;
|
||
|
|
transition: filter 0.2s ease-in-out, stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* --- ESTADO HOVER (Sutil) --- */
|
||
|
|
/* Se aplica solo si la geografía NO está seleccionada */
|
||
|
|
.rsm-geography:not(.selected):hover {
|
||
|
|
filter: brightness(1.10);
|
||
|
|
stroke: #0000ff;
|
||
|
|
stroke-width: 0.5px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* --- ESTADO SELECCIONADO (Foco) --- */
|
||
|
|
/* Clase que añadiremos desde React para el municipio en foco */
|
||
|
|
.rsm-geography.selected {
|
||
|
|
stroke: #0000ff; /* Borde negro para el seleccionado */
|
||
|
|
stroke-width: 0.5px; /* <-- Borde más grueso para destacar */
|
||
|
|
filter: none; /* Quitamos cualquier otro filtro para que se vea nítido */
|
||
|
|
pointer-events: none; /* Desactivamos eventos para que no interfiera el hover */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Reglas para los mapas atenuados (sin cambios) */
|
||
|
|
.rsm-geography-faded,
|
||
|
|
.rsm-geography-faded-municipality {
|
||
|
|
opacity: 0.3;
|
||
|
|
pointer-events: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.rsm-geography-faded:hover,
|
||
|
|
.rsm-geography-faded-municipality:hover {
|
||
|
|
filter: none;
|
||
|
|
stroke: #FFFFFF;
|
||
|
|
stroke-width: 0.5px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.partido-barra-foreground {
|
||
|
|
height: 100%;
|
||
|
|
border-radius: 4px;
|
||
|
|
transition: width 0.5s ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Spinner para la transición entre mapas */
|
||
|
|
.transition-spinner {
|
||
|
|
position: absolute;
|
||
|
|
top: 0;
|
||
|
|
left: 0;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
background-color: rgba(255, 255, 255, 0.5); /* Fondo blanco semitransparente */
|
||
|
|
z-index: 20;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
}
|
||
|
|
/* Estilo del spinner en sí mismo */
|
||
|
|
.transition-spinner::after {
|
||
|
|
content: '';
|
||
|
|
width: 50px;
|
||
|
|
height: 50px;
|
||
|
|
border: 5px solid rgba(0, 0, 0, 0.2);
|
||
|
|
border-top-color: #007bff;
|
||
|
|
border-radius: 50%;
|
||
|
|
animation: spin 1s linear infinite;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes spin {
|
||
|
|
to { transform: rotate(360deg); }
|
||
|
|
}
|