/* WattBites BMU Generation Map — bmu-map.css */

#wbbm-portal {
    font-family: 'Source Serif 4', Georgia, serif;
    color: #2a2a2a;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 2rem;
}

.wbbm-header { margin-bottom: 1rem; }
.wbbm-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}
.wbbm-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wbbm-badge {
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 20px;
    background: #f0ece4;
    color: #666;
    border: 1px solid #ddd;
}
.wbbm-badge-live  { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.wbbm-badge-error { background: #fff3e0; color: #bf360c; border-color: #ffcc80; }
.wbbm-ts, .wbbm-cd { font-size: 0.72rem; color: #aaa; }

.wbbm-source-note {
    font-size: 0.75rem;
    color: #888;
    background: #f9f6f0;
    border-left: 3px solid #c8a84b;
    padding: 6px 12px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Layout */
.wbbm-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 720px) {
    .wbbm-layout { grid-template-columns: 1fr; }
}

/* Map column */
.wbbm-map-col { position: relative; }
#wbbm-svg {
    width: 100%;
    height: auto;
    display: block;
    background: #f5f8fb;
    border: 1px solid #e0ddd6;
    border-radius: 8px;
}

/* BMU markers */
.wbbm-marker {
    cursor: pointer;
    transition: r 0.2s, opacity 0.2s;
}
.wbbm-marker:hover { opacity: 0.85; }
.wbbm-marker.dim { opacity: 0.15; }

/* Map legend */
.wbbm-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #666;
}
.wbbm-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.wbbm-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Panel column */
.wbbm-panel-col { min-width: 0; }

/* Fuel tabs */
.wbbm-fuel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}
.wbbm-fuel-tab {
    font-family: inherit;
    font-size: 0.72rem;
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
}
.wbbm-fuel-tab:hover { background: #f5f0e8; }
.wbbm-fuel-tab.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* Aggregate section */
.wbbm-aggregate {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1rem;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8e2d9;
    border-radius: 8px;
}
#wbbm-donut { flex-shrink: 0; width: 100px; height: 100px; }
.wbbm-agg-stats { flex: 1; min-width: 0; }
.wbbm-agg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 2px 0;
    color: #555;
}
.wbbm-agg-row-label {
    display: flex;
    align-items: center;
    gap: 6px;
}
.wbbm-agg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wbbm-agg-mw { font-weight: 600; color: #1a1a2e; }
.wbbm-agg-pct { color: #aaa; font-size: 0.7rem; }

/* Asset list */
.wbbm-asset-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.wbbm-asset-header span:first-child {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wbbm-asset-count { font-size: 0.7rem; color: #bbb; }

.wbbm-asset-list {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e8e2d9;
    border-radius: 6px;
}
.wbbm-asset-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #f5f0e8;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.78rem;
}
.wbbm-asset-row:last-child { border-bottom: none; }
.wbbm-asset-row:hover { background: #faf8f4; }
.wbbm-asset-row.highlighted { background: #fdf8ef; }

.wbbm-asset-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wbbm-asset-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wbbm-asset-sub {
    font-size: 0.68rem;
    color: #999;
}
.wbbm-asset-mw {
    text-align: right;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}
.wbbm-asset-bar-wrap {
    grid-column: 1 / -1;
    height: 3px;
    background: #f0ece4;
    border-radius: 2px;
    margin-top: -4px;
}
.wbbm-asset-bar { height: 100%; border-radius: 2px; }

.wbbm-loading {
    padding: 1.5rem;
    text-align: center;
    color: #aaa;
    font-style: italic;
    font-size: 0.85rem;
}

/* Footer */
.wbbm-footer {
    font-size: 0.7rem;
    color: #bbb;
    padding-top: 1rem;
    border-top: 1px solid #f0ece4;
    margin-top: 1rem;
    line-height: 1.7;
}
