/* WattBites Live Generation Map — live-map.css */

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

/* Header */
.wblm-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.25rem;
}
.wblm-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}
.wblm-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wblm-badge {
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 20px;
    background: #f0ece4;
    color: #666;
    border: 1px solid #ddd;
}
.wblm-badge-live { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.wblm-badge-error { background: #fff3e0; color: #bf360c; border-color: #ffcc80; }
.wblm-timestamp { font-size: 0.78rem; color: #888; }
.wblm-countdown { font-size: 0.72rem; color: #bbb; }

/* Map */
.wblm-map-wrap {
    background: #f5f8fb;
    border: 1px solid #e0ddd6;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    position: relative;
}
#wblm-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Interconnector lines */
.ic-line {
    transition: stroke 0.4s;
    cursor: pointer;
}
.ic-line.importing { stroke: #1D9E75; }
.ic-line.exporting { stroke: #D85A30; }
.ic-line.zero      { stroke: #ccc; }

/* Flow animation on lines */
@keyframes dash-flow-fwd {
    to { stroke-dashoffset: -20; }
}
@keyframes dash-flow-rev {
    to { stroke-dashoffset: 20; }
}
.ic-line.importing {
    animation: dash-flow-fwd 1.2s linear infinite;
}
.ic-line.exporting {
    animation: dash-flow-rev 1.2s linear infinite;
}

/* IC labels on map */
.ic-mw-label {
    font-size: 9px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    pointer-events: none;
}
.ic-mw-label.importing { fill: #1D9E75; }
.ic-mw-label.exporting { fill: #D85A30; }
.ic-mw-label.zero      { fill: #aaa; }

/* Donut slice hover */
.donut-slice {
    cursor: pointer;
    transition: opacity 0.2s;
}
.donut-slice:hover { opacity: 0.8; }

/* Stats panels */
.wblm-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 600px) {
    .wblm-stats-grid { grid-template-columns: 1fr; }
}

.wblm-stat-panel {
    background: #fff;
    border: 1px solid #e8e2d9;
    border-radius: 8px;
    padding: 16px;
}
.wblm-stat-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wblm-flag { font-size: 1rem; }

/* Fuel bars */
.wblm-fuel-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.wblm-fuel-bar-label {
    font-size: 0.72rem;
    color: #666;
    width: 70px;
    flex-shrink: 0;
    text-align: right;
}
.wblm-fuel-bar-track {
    flex: 1;
    height: 7px;
    background: #f0ece4;
    border-radius: 4px;
    overflow: hidden;
}
.wblm-fuel-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.wblm-fuel-bar-mw {
    font-size: 0.7rem;
    color: #999;
    width: 55px;
    flex-shrink: 0;
    text-align: right;
}

/* Interconnector list in stats */
.wblm-ic-list {
    margin-top: 10px;
    border-top: 1px solid #f0ece4;
    padding-top: 8px;
}
.wblm-ic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    padding: 3px 0;
    color: #555;
}
.wblm-ic-flow {
    font-weight: 600;
    min-width: 65px;
    text-align: right;
}
.wblm-ic-flow.importing { color: #1D9E75; }
.wblm-ic-flow.exporting { color: #D85A30; }
.wblm-ic-flow.zero      { color: #aaa; }

/* Ireland extras */
.wblm-ie-extras {
    margin-top: 10px;
    border-top: 1px solid #f0ece4;
    padding-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.wblm-ie-extra-item { font-size: 0.72rem; color: #666; }
.wblm-ie-extra-val  { font-size: 0.9rem; font-weight: 600; color: #1a1a2e; }

/* Loading & error states */
.wblm-loading-sm { font-size: 0.8rem; color: #aaa; font-style: italic; padding: 4px 0; }

/* Legend */
.wblm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.72rem;
    color: #666;
    margin: 0.75rem 0 1rem;
}
.wblm-legend-item { display: flex; align-items: center; gap: 5px; }
.wblm-legend-swatch {
    width: 12px; height: 8px; border-radius: 2px; flex-shrink: 0;
}
.wblm-legend-line-import { width: 18px; height: 3px; background: #1D9E75; flex-shrink: 0; }
.wblm-legend-line-export { width: 18px; height: 3px; background: #D85A30; flex-shrink: 0; }

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