/**
 * Estilos para la visualización del grafo de coocurrencia de palabras
 */

/* Contenedor principal */
.grafo-container {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

/* SVG del grafo */
.grafo-svg {
    width: 100%;
    height: 100%;
}

/* Tooltip */
.grafo-tooltip {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    pointer-events: none;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 250px;
}

.tooltip-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.tooltip-freq {
    margin-bottom: 5px;
    color: #666;
}

.tooltip-connections {
    margin-top: 5px;
    font-weight: bold;
}

.tooltip-list {
    margin: 5px 0 0 0;
    padding-left: 15px;
}

/* Panel de filtros */
.filtros-panel {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.filtros-panel h4 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.filtros-grupo {
    margin-bottom: 15px;
}

.filtros-grupo label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.slider-container {
    display: flex;
    align-items: center;
}

.slider-container input {
    flex-grow: 1;
    margin-right: 10px;
}

.slider-value {
    width: 30px;
    text-align: center;
    font-weight: bold;
}

/* Panel de estadísticas */
.stats-panel {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.stats-panel h4 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.stat-item {
    margin-bottom: 10px;
}

.stat-label {
    font-weight: bold;
    margin-right: 5px;
}

/* Indicador de carga */
#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* Mensaje de error */
#error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: none;
}

/* Botones */
.btn-group {
    margin-top: 15px;
}

/* Estilos para nodos y enlaces */
.nodes circle {
    stroke-width: 1.5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.links line {
    stroke-opacity: 0.6;
    transition: opacity 0.3s;
}

.texts text {
    font-family: Arial, sans-serif;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .grafo-container {
        height: 400px;
    }
    
    .filtros-panel, .stats-panel {
        padding: 10px;
    }
}
