/* --- Containers & Layout --- */
#bubble-chart-container {
    margin: 2rem 0;
    text-align: center;
    position: relative;
}

/* --- UI Controls (Buttons) --- */
.view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.view-toggle button {
    background-color: #f2f2f2;
    border: 1px solid #ddd;
    color: #333;
    cursor: pointer;
    font-size: 1em;
    padding: 10px 15px;
    transition: background-color 0.3s, color 0.3s;
    margin: 0 5px;
}

/* Supports both 'active' (old css) and 'primary' (your JS) */
.view-toggle button.active,
.view-toggle button.primary {
    background-color: #333;
    color: #fff;
}

/* --- D3 Bubble Chart --- */
#bubble-chart {
    width: 100%;
    height: auto;
    display: block;
    font-family: "Source Sans Pro", Helvetica, sans-serif;
}

.bubble {
    stroke-width: 1px;
    stroke: #fff;
    cursor: pointer;
}

/* --- TEXT LABELS UPDATED --- */
.bubble-title {
    fill: #000; /* Black by default */
    text-anchor: middle;
    pointer-events: none;
    font-size: 1.25rem; /* Increased from 10px */
    font-family: "Source Sans Pro", Helvetica, sans-serif;
}

/* --- Tooltip --- */
.tooltip {
    position: absolute;
    background-color: #fff;
    color: #212931;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;
    max-width: 300px;
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid #eee;
    z-index: 100;
}

.tooltip h3 {
    font-family: "Source Sans Pro", Helvetica, sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: #212931;
    text-transform: uppercase;
    letter-spacing: 0.075em;
}

.tooltip h4 {
    font-family: "Source Sans Pro", Helvetica, sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
    color: #7a7a7a;
    text-transform: uppercase;
    letter-spacing: 0.075em;
}

.tooltip p {
    margin: 0;
    text-align: left;
}

/* --- Focus View --- */
.focus-axis-line {
    stroke: #333;
    stroke-width: 2px;
}

.focus-label {
    font-family: "Source Sans Pro", Helvetica, sans-serif;
    font-weight: 900;
    fill: #333;
    letter-spacing: 0.075em;
}

/* --- View Descriptions --- */
.view-description {
    margin-top: 2rem;
}