/**
 * SpeakOX Story Visualization CSS
 * Styling for interactive story network visualizations
 */

/* Container styling */
.story-visualization-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    height: 400px;
}

/* Loading indicator styling */
.story-visualization-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

/* Node hover tooltip */
.story-visualization-tooltip {
    position: absolute;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    max-width: 250px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.story-visualization-tooltip.active {
    opacity: 1;
}

.story-visualization-tooltip h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: bold;
}

.story-visualization-tooltip .tooltip-category {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin: 2px 0;
}

.story-visualization-tooltip .tooltip-reactions {
    margin-top: 5px;
    display: flex;
    gap: 5px;
}

.story-visualization-tooltip .tooltip-reaction {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Visualization legend */
.story-visualization-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .story-visualization-container {
        height: 300px;
    }
    
    .story-visualization-legend {
        display: none;
    }
}

/* Animation effects */
.pulse-node {
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}