/* Midas Chart Elements — kpi_tile, ranked_table, chart.js containers */

.midas-chart-element {
    margin-bottom: 20px;
}

.midas-chart-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

/* KPI tile */
.midas-kpi-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    min-width: 160px;
}

.midas-kpi-tile-value {
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}

.midas-kpi-tile-label {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

/* Ranked table */
.midas-ranked-table-inner {
    width: 100%;
    border-collapse: collapse;
}

.midas-ranked-table-inner th,
.midas-ranked-table-inner td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    font-size: 13px;
    /* Explicit color: without it, td inherits the theme text color —
       on light-on-dark themes that renders white text on the white card. */
    color: #1d2327;
}

.midas-ranked-table-inner th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

/* Chart.js container */
.midas-chartjs-block {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 16px 20px;
}

.midas-chart-canvas {
    max-height: 360px;
}

/* Regional map (Leaflet choropleth) */
.midas-map-block {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 16px 20px;
}

.midas-map-canvas {
    height: 420px;
    border-radius: 6px;
}

.midas-map-controls {
    margin: 0 0 8px;
    font-size: 13px;
    color: #374151;
}

.midas-map-controls .midas-map-value-select {
    max-width: 100%;
    font-size: 13px;
}

.midas-map-loading {
    padding: 40px 0;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* Notices */
.midas-chart-notice {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.midas-chart-notice--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.midas-chart-notice--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
