/* ===== BUBBLE CHART STYLES ===== */

/* Container */
#bubble-chart-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.toggle-label {
    font-size: 14px;
    color: #666;
}

.toggle-label.active {
    color: #333;
    font-weight: bold;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    cursor: pointer;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.toggle-switch.non-fatal::after {
    transform: translateX(24px);
    background: #27ae60;
}

/* Axes */
.axis path,
.axis line {
    stroke: #ccc;
}

.axis text {
    font-size: 11px;
    fill: #666;
}

.axis-label {
    font-size: 12px;
    fill: #666;
}

/* Grid */
.grid line {
    stroke: #eee;
}

.grid path {
    stroke: none;
}

/* Bubbles */
.bubble {
    cursor: pointer;
    transition: opacity 0.2s;
}

.bubble:hover {
    opacity: 0.7;
}

/* Tooltip */
.bubble-tooltip {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.bubble-tooltip .species-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.bubble-tooltip .fatal {
    color: #e74c3c;
}

.bubble-tooltip .non-fatal {
    color: #27ae60;
}