﻿.bashpa-iec-shell {
    border: 1px solid #c7c7c7;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    padding: 16px 20px;
    margin: 18px 0;
    color: #111111;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.bashpa-iec-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.bashpa-iec-head-text {
    min-width: 0;
}

.bashpa-iec-title {
    margin: 0;
}

.bashpa-iec-subtitle {
    margin: 4px 0 0;
    color: #505050;
    font-size: 0.9em;
}

.bashpa-iec-page .bess-header {
    margin-bottom: 0;
    padding-bottom: 0;
}

.bashpa-iec-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.bashpa-iec-chart-actions {
    margin-top: 10px;
}

.bashpa-iec-main-row {
    display: grid;
    grid-template-columns: minmax(0, 75%) minmax(240px, 25%);
    gap: 12px;
    align-items: start;
}

.bashpa-iec-chart-column {
    min-width: 0;
}

.bashpa-iec-shell.is-installed-capacity .bashpa-iec-main-row,
.bashpa-iec-shell.is-production-chart .bashpa-iec-main-row {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
}

.bashpa-iec-installed-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    margin: 8px 0 10px;
}

.bashpa-iec-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    border: 1px solid #c7c7c7;
    background: #f3f4f6;
    color: #6b7280;
    filter: grayscale(1);
    padding: 5px 10px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.bashpa-iec-view-tab.is-active {
    background: #ffffff;
    border-color: #046BD2;
    color: #046BD2;
    filter: none;
    box-shadow: inset 0 -2px 0 #046BD2;
}

.bashpa-iec-view-tab:hover,
.bashpa-iec-view-tab:focus {
    border-color: #046BD2;
    color: #046BD2;
    outline: none;
}

.bashpa-iec-view-tab-icon {
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    line-height: 1;
}

.bashpa-iec-controls-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    margin-left: auto;
    border: 1px solid #046BD2;
    background: #ffffff;
    color: #046BD2;
    padding: 5px 11px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.bashpa-iec-controls-toggle:hover,
.bashpa-iec-controls-toggle:focus {
    background: #eef6ff;
    outline: none;
}

.bashpa-iec-controls-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    font-size: 0.72rem;
    line-height: 1;
}

.bashpa-iec-controls-column {
    min-width: 0;
    border-left: 1px solid #d6dde8;
    padding-left: 10px;
    display: grid;
    gap: 10px;
    align-content: start;
}

.bashpa-iec-shell.is-installed-capacity .bashpa-iec-controls-overlay,
.bashpa-iec-shell.is-production-chart .bashpa-iec-controls-overlay {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    z-index: 30;
    width: min(340px, 100%);
    max-height: min(560px, calc(100vh - 180px));
    overflow: auto;
    border: 1px solid #c7c7c7;
    border-left: 1px solid #c7c7c7;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
    padding: 12px;
}

.bashpa-iec-shell.is-installed-capacity.is-controls-open .bashpa-iec-controls-overlay,
.bashpa-iec-shell.is-production-chart.is-controls-open .bashpa-iec-controls-overlay {
    display: grid;
}

.bashpa-iec-controls-overlay-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d6dde8;
    font-size: 0.9rem;
}

.bashpa-iec-controls-close {
    width: 28px;
    height: 28px;
    border: 1px solid #c7c7c7;
    background: #ffffff;
    color: #111111;
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.bashpa-iec-controls-close:hover,
.bashpa-iec-controls-close:focus {
    border-color: #046BD2;
    color: #046BD2;
    outline: none;
}

.bashpa-iec-btn {
    border: 1px solid #c7c7c7;
    background: #ffffff;
    color: #111111;
    border-radius: 0;
    padding: 6px 12px;
    font-size: 0.85em;
    cursor: pointer;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    transition: background-color 0.2s ease;
}
.bashpa-iec-btn:hover {
    background: #f8f9fa;
}
.bashpa-iec-btn:hover {
    background: #f8f9fa;
}

.bashpa-iec-canvas-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.bashpa-iec-canvas-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #c7c7c7;
    background: rgba(255, 255, 255, 0.96);
    color: #111111;
    font: inherit;
    font-weight: 700;
    font-size: 1em;
    line-height: 1;
    cursor: pointer;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bashpa-iec-canvas-btn:hover {
    background: #f3f6fa;
    border-color: #046BD2;
    color: #046BD2;
}

.bashpa-iec-shell.is-panning .bashpa-iec-canvas {
    cursor: grabbing;
}

.bashpa-iec-canvas {
    cursor: grab;
}

.bashpa-iec-shell:fullscreen,
.bashpa-iec-shell:-webkit-full-screen,
.bashpa-iec-shell.is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 999999;
}

.bashpa-iec-shell:fullscreen::backdrop {
    background: #ffffff;
}

.bashpa-iec-shell:-webkit-full-screen::-webkit-backdrop {
    background: #ffffff;
}

.bashpa-iec-shell:fullscreen .bashpa-iec-body,
.bashpa-iec-shell:-webkit-full-screen .bashpa-iec-body,
.bashpa-iec-shell.is-fullscreen .bashpa-iec-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
}

.bashpa-iec-shell:fullscreen .bashpa-iec-heatmap,
.bashpa-iec-shell:fullscreen .bashpa-iec-table-wrap,
.bashpa-iec-shell:-webkit-full-screen .bashpa-iec-heatmap,
.bashpa-iec-shell:-webkit-full-screen .bashpa-iec-table-wrap,
.bashpa-iec-shell.is-fullscreen .bashpa-iec-heatmap,
.bashpa-iec-shell.is-fullscreen .bashpa-iec-table-wrap {
    max-height: none;
}

body.bashpa-iec-fullscreen-active {
    overflow: hidden !important;
}

.bashpa-iec-btn-primary {
    background: #046BD2;
    color: #ffffff;
    border-color: #046BD2;
}

.bashpa-iec-btn-primary:hover {
    background: #0355a8;
}

.bashpa-iec-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 0;
}

.bashpa-iec-filter {
    display: grid;
    gap: 4px;
    font-size: 0.85em;
    color: #505050;
}

.bashpa-iec-filter-label {
    font-weight: 600;
    color: #111111;
}

.bashpa-iec-filter-input {
    width: 100%;
    border-radius: 0;
    border: 1px solid #c7c7c7;
    padding: 6px 12px;
    background: #ffffff;
    color: #111111;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
    min-height: 34px;
    transition: background-color 0.2s ease;
}

.bashpa-iec-filter-input:focus {
    outline: 1px solid #046BD2;
}

.bashpa-iec-filter-input:hover {
    background: #f8f9fa;
}
.bashpa-iec-range-input {
    padding: 0;
    min-height: 28px;
    accent-color: #046BD2;
}

.bashpa-iec-range-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.bashpa-iec-range-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    width: fit-content;
    border: 1px solid #c7c7c7;
    background: #f8f9fa;
    color: #111111;
    padding: 4px 8px;
    font-size: 0.9em;
    font-weight: 700;
}

.bashpa-iec-filter-note {
    border-left: 3px solid #046BD2;
    background: #f8f9fa;
    color: #505050;
    font-size: 0.82em;
    line-height: 1.35;
    padding: 8px 10px;
}

input.bashpa-iec-filter-input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
    color: #111111;
}

input.bashpa-iec-filter-input[type="date"]::-webkit-date-and-time-value,
input.bashpa-iec-filter-input[type="date"]::-webkit-datetime-edit,
input.bashpa-iec-filter-input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input.bashpa-iec-filter-input[type="date"]::-webkit-datetime-edit-text,
input.bashpa-iec-filter-input[type="date"]::-webkit-datetime-edit-day-field,
input.bashpa-iec-filter-input[type="date"]::-webkit-datetime-edit-month-field,
input.bashpa-iec-filter-input[type="date"]::-webkit-datetime-edit-year-field {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 1em;
    font-weight: 600;
    color: #111111;
}

input.bashpa-iec-filter-input[type="date"]::-moz-focus-inner {
    border: 0;
}

input.bashpa-iec-filter-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
}

input.bashpa-iec-filter-input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.bashpa-iec-status {
    border-radius: 0;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 0.9em;
    border: 1px solid #c7c7c7;
}

.bashpa-iec-status-loading {
    background: #f0f2f4;
    color: #505050;
}

.bashpa-iec-status-error {
    background: #fef3f3;
    color: #8a1c1c;
    border-color: #e57f1f;
}

.bashpa-iec-status-empty {
    background: #f8f9fa;
    color: #666666;
}

.bashpa-iec-body {
    position: relative;
    min-height: 280px;
}

.bashpa-iec-canvas,
.bashpa-iec-heatmap,
.bashpa-iec-table-wrap {
    width: 100%;
    height: 100%;
}

.bashpa-iec-heatmap,
.bashpa-iec-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
}

.bashpa-iec-heatmap {
    max-height: 420px;
}

.bashpa-iec-table,
.bashpa-iec-heatmap-table {
    width: auto;
    border-collapse: collapse;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    min-width: 100%;
}

.bashpa-iec-table th {
    background: #f0f2f4;
    font-weight: 600;
    color: #111111;
}

.bashpa-iec-table th,
.bashpa-iec-table td,
.bashpa-iec-heatmap-table th,
.bashpa-iec-heatmap-table td {
    border-bottom: 1px solid #c7c7c7;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.9em;
    color: #111111;
}

.bashpa-iec-heat-cell {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
    width: 24px;
    height: 22px;
    min-width: 24px;
    padding: 0 !important;
    font-size: 0 !important;
}

.bashpa-iec-footer {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #c7c7c7;
    color: #505050;
    font-size: 0.8em;
}

.bashpa-iec-meta-left {
    display: grid;
    align-items: center;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 10px;
}

.bashpa-iec-meta-left [data-role="source-note"] {
    justify-self: start;
}

.bashpa-iec-meta-left [data-role="quality-badge"] {
    justify-self: center;
}

.bashpa-iec-meta-left [data-role="status-group"] {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.bashpa-iec-footer [data-role="source-note"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.bashpa-iec-source-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #7c8796;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #405065;
    background: #f4f7fb;
    cursor: help;
    position: relative;
    line-height: 1;
}

.bashpa-iec-source-info:focus {
    outline: 1px solid #046BD2;
    outline-offset: 1px;
}

.bashpa-iec-source-popover {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    min-width: 260px;
    max-width: 360px;
    padding: 8px 10px;
    border: 1px solid #c7c7c7;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    font-size: 0.86em;
    font-weight: 500;
    line-height: 1.45;
    z-index: 20;
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.bashpa-iec-source-info:hover .bashpa-iec-source-popover,
.bashpa-iec-source-info:focus .bashpa-iec-source-popover,
.bashpa-iec-source-info:focus-within .bashpa-iec-source-popover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.bashpa-iec-quality-badge {
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 0;
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.bashpa-iec-status-badge {
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 0;
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: #0c9251;
    background: transparent;
}

.bashpa-iec-meta-left [data-role="last-updated"] {
    text-align: right;
    white-space: nowrap;
}

.bashpa-iec-quality-live {
    color: #1f5d3f;
    background: transparent;
}

.bashpa-iec-quality-synthetic {
    color: #8c3d0a;
    background: transparent;
}

.bashpa-iec-quality-mixed {
    color: #1e4f80;
    background: transparent;
}

.bashpa-iec-quality-unknown {
    color: #3f4b5a;
    background: transparent;
}


.bashpa-iec-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 8px;
    align-items: stretch;
    background: #ffffff;
    padding: 8px 0;
}

.bashpa-iec-section-block {
    background: #ffffff;
    padding: 10px 28px 12px;
}

.bashpa-iec-section-heading {
    margin: 0 0 8px;
    font-size: 1.22em;
    line-height: 1.2;
    color: #046BD2;
    font-weight: 600;
}

.bashpa-iec-accordion {
    border: 0;
    margin-top: 18px;
}

.bashpa-iec-accordion-title {
    margin: 0;
}

.bashpa-iec-accordion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bashpa-iec-accordion-trigger {
    width: auto;
    text-align: center;
    border: 1px solid #c8d3e3;
    background: #f6f9ff;
    color: #223047;
    padding: 9px 10px;
    font-size: 0.92em;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.bashpa-iec-accordion-trigger:hover,
.bashpa-iec-accordion-trigger:focus {
    background: #ebf2ff;
    border-color: #9eb8df;
    outline: none;
}

.bashpa-iec-accordion-trigger.is-active {
    background: #046BD2;
    border-color: #0359af;
    color: #ffffff;
}

.bashpa-iec-page-grid {
    display: grid;
    gap: 8px;
    margin-top: 0;
    border-left: 0;
    padding-left: 0;
}

.bashpa-iec-layout .bashpa-iec-shell {
    border: 0;
    margin: 0;
}

.bashpa-iec-chart-description {
    margin-top: 18px;
    border-top: 0;
    color: #1f2937;
}

.bashpa-iec-chart-description-heading {
    margin: 0;
}

.bashpa-iec-chart-description-title {
    margin: 0 0 8px;
    font-size: 1.04em;
    color: #046BD2;
    font-weight: 600;
}

.bashpa-iec-chart-description-body p {
    margin: 0 0 7px;
    font-size: 0.92em;
    line-height: 1.5;
    color: #2d3748;
}

.bashpa-iec-chart-description-body p:last-child {
    margin-bottom: 0;
}

.bashpa-iec-switcher {
    display: none;
}

.bashpa-iec-switcher-label {
    display: none;
}

/* Make all dropdowns visually consistent with top action buttons. */
select.bashpa-iec-filter-input,
.bashpa-iec-switcher-select {
    width: 100%;
    border: 1px solid #c7c7c7;
    background: #ffffff;
    color: #111111;
    border-radius: 0;
    padding: 6px 34px 6px 12px;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.2;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    min-height: 34px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #666666 50%), linear-gradient(135deg, #666666 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

select.bashpa-iec-filter-input:hover,
.bashpa-iec-switcher-select:hover {
    background-color: #f8f9fa;
}

select.bashpa-iec-filter-input:focus,
.bashpa-iec-switcher-select:focus {
    outline: 1px solid #046BD2;
    outline-offset: 0;
}

.bashpa-iec-panel {
    display: none;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.bashpa-iec-panel.is-active {
    display: block;
}

@media (max-width: 780px) {
    .bashpa-iec-main-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bashpa-iec-controls-column {
        border-left: 0;
        border-top: 1px solid #d6dde8;
        padding-left: 0;
        padding-top: 10px;
    }

    .bashpa-iec-layout {
        grid-template-columns: 1fr;
        padding: 10px 0;
    }

    .bashpa-iec-accordion {
        position: static;
        margin-top: 14px;
        border-top: 0;
    }

    .bashpa-iec-page-grid {
        border-left: 0;
        padding-left: 0;
    }

    .bashpa-iec-layout .bashpa-iec-shell {
        padding: 10px 0 12px;
    }

    .bashpa-iec-chart-description {
        margin-top: 14px;
        border-top: 0;
    }

    .bashpa-iec-section-block {
        padding: 10px 0 12px;
    }

    .bashpa-iec-shell {
        padding: 14px 16px;
    }

    .bashpa-iec-head {
        flex-direction: column;
    }

    .bashpa-iec-actions {
        justify-content: flex-start;
    }

    .bashpa-iec-footer {
        flex-direction: column;
    }

    .bashpa-iec-meta-left {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }

    .bashpa-iec-meta-left [data-role="status-group"],
    .bashpa-iec-meta-left [data-role="quality-badge"],
    .bashpa-iec-meta-left [data-role="last-updated"],
    .bashpa-iec-meta-left [data-role="source-note"] {
        justify-self: start;
        text-align: left;
    }
}

/* ── Static Data Sources section ───────────────────────────────────────── */
.bashpa-iec-sources-static {
    margin: 10px 0 12px;
    color: #111111;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.bashpa-iec-sources-head {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
}

.bashpa-iec-sources-title {
    margin: 0;
}

.bashpa-iec-sources-subtitle {
    margin: 2px 0 0;
    color: #505050;
    font-size: 0.86em;
}

.bashpa-iec-sources-loading,
.bashpa-iec-sources-error {
    padding: 8px 0;
    font-size: 0.9em;
    color: #505050;
}

.bashpa-iec-sources-error {
    color: #c0392b;
}

.bashpa-iec-sources-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9em;
    border: none;
}

.bashpa-iec-sources-table th,
.bashpa-iec-sources-table td {
    text-align: left;
    padding: 8px 10px;
    border: none;
    vertical-align: top;
}

.bashpa-iec-sources-table th {
    background: #ffffff;
    font-weight: 600;
    color: #111111;
    white-space: nowrap;
}

/* Inner vertical lines only, matching other simulator tables */
.bashpa-iec-sources-table th + th,
.bashpa-iec-sources-table td + td {
    border-left: 1px solid #111111;
}

/* Inner horizontal lines only */
.bashpa-iec-sources-table tbody td {
    border-top: 1px solid #111111;
}

.bashpa-iec-sources-table tbody tr:first-child td {
    border-top: 2px solid #111111;
}

.bashpa-iec-sources-table th:nth-child(2),
.bashpa-iec-sources-table td:nth-child(2) {
    border-left: 2px solid #111111;
}

.bashpa-iec-sources-table td.iec-src-name {
    font-weight: 600;
    white-space: nowrap;
}

.bashpa-iec-sources-table td.iec-src-notes {
    color: #505050;
    font-size: 0.88em;
}

.bashpa-iec-sources-table td.iec-src-tags {
    white-space: normal;
    color: #333333;
    font-size: 0.85em;
}

.bashpa-iec-sources-table td.iec-src-freq {
    white-space: nowrap;
    font-size: 0.85em;
}

.bashpa-iec-sources-table td.iec-src-name a {
    color: #046BD2;
    text-decoration: none;
    font-weight: 600;
}

.bashpa-iec-sources-table td.iec-src-name a:hover {
    text-decoration: underline;
}

.bashpa-iec-sources-footer {
    margin-top: 8px;
    font-size: 0.8em;
    color: #888888;
    border-top: 1px solid #e8e8e8;
    padding-top: 6px;
}

/* Fallback disclaimer styling for India Energy Charts page. */
.bashpa-iec-page .bess-disclaimer {
    margin-top: 14px;
    padding: 12px 28px;
    background: #f0f2f4;
    border: 1px solid #c7c7c7;
    border-radius: 0;
    font-size: 0.8em;
    color: #666666;
    line-height: 1.6;
}


.bashpa-iec-installed-year-slider {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 12px;
    padding: 10px 0 0;
}

.bashpa-iec-installed-year-slider .bashpa-iec-filter-year-slider {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.bashpa-iec-installed-year-range-pair {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    position: relative;
}

.bashpa-iec-installed-year-range-pair::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    height: 1px;
    width: 100%;
    background: #cbd5e1;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-slider {
    display: contents;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-start .bashpa-iec-filter-label,
.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-end .bashpa-iec-filter-label {
    display: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-start .bashpa-iec-range-value {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-end .bashpa-iec-range-value {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
}

.bashpa-iec-installed-year-slider .bashpa-iec-filter-label {
    grid-column: 1;
    white-space: nowrap;
}

.bashpa-iec-installed-year-slider .bashpa-iec-range-input {
    grid-column: 2;
    grid-row: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #046BD2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-range-input {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-start .bashpa-iec-range-input {
    z-index: 2;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-filter-year-end .bashpa-iec-range-input {
    z-index: 3;
}

.bashpa-iec-installed-year-slider .bashpa-iec-range-input::-webkit-slider-runnable-track {
    height: 1px;
    background: #cbd5e1;
    border: 0;
    border-radius: 999px;
}

.bashpa-iec-installed-year-slider .bashpa-iec-range-input::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -5.5px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #046BD2;
    box-shadow: 0 0 0 1px #046BD2;
    -webkit-appearance: none;
    appearance: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-range-input::-webkit-slider-runnable-track {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-range-input::-webkit-slider-thumb {
    pointer-events: auto;
}

.bashpa-iec-installed-year-slider .bashpa-iec-range-input::-moz-range-track {
    height: 1px;
    background: #cbd5e1;
    border: 0;
    border-radius: 999px;
}

.bashpa-iec-installed-year-slider .bashpa-iec-range-input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #046BD2;
    box-shadow: 0 0 0 1px #046BD2;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-range-input::-moz-range-track {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-range-input::-moz-range-progress {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.bashpa-iec-installed-year-range-pair .bashpa-iec-range-input::-moz-range-thumb {
    pointer-events: auto;
}

.bashpa-iec-installed-year-slider .bashpa-iec-range-value {
    grid-column: 3;
    grid-row: 1;
    min-width: 44px;
    text-align: right;
    color: #046BD2;
    font-weight: 700;
    border: 0;
    background: transparent;
    padding: 0;
}

.bashpa-iec-capacity-map-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.bashpa-iec-capacity-map-wrap {
    position: relative;
}

.bashpa-iec-capacity-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    align-items: start;
}

.bashpa-iec-capacity-map-grid.has-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bashpa-iec-capacity-map-panel {
    min-width: 0;
}

.bashpa-iec-capacity-map {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    min-height: 430px;
}

.bashpa-iec-capacity-map-grid.has-comparison .bashpa-iec-capacity-map {
    max-width: 100%;
    min-height: 300px;
}

.bashpa-iec-capacity-map-svg {
    display: block;
    width: 100%;
    height: min(68vh, 620px);
    min-height: 420px;
    background: #ffffff;
}

.bashpa-iec-capacity-map-grid.has-comparison .bashpa-iec-capacity-map-svg {
    height: min(46vh, 420px);
    min-height: 300px;
}

.bashpa-iec-capacity-state {
    stroke: #ffffff;
    stroke-width: 0.55;
    vector-effect: non-scaling-stroke;
}

.bashpa-iec-capacity-state.has-data {
    cursor: pointer;
}

.bashpa-iec-capacity-state.has-data:hover,
.bashpa-iec-capacity-state.has-data:focus {
    stroke: #046BD2;
    stroke-width: 1.7;
    outline: none;
}

.bashpa-iec-capacity-state.is-dimmed {
    opacity: 0.22;
}

.bashpa-iec-capacity-state.is-dimmed-by-state {
    opacity: 0.28;
}

.bashpa-iec-capacity-state.is-segment-highlighted {
    opacity: 1;
    stroke: #111827;
    stroke-width: 1.9;
}

.bashpa-iec-capacity-state.is-state-linked-highlight {
    opacity: 1;
    stroke: #046BD2;
    stroke-width: 2.2;
    filter: drop-shadow(0 1px 2px rgba(4, 107, 210, 0.35));
}

.bashpa-iec-capacity-state:not(.has-data) {
    stroke: #cbd5e1;
    stroke-dasharray: 2 2;
}

.bashpa-iec-capacity-hover-card {
    position: absolute;
    z-index: 12;
    width: min(310px, calc(100% - 16px));
    border: 1px solid #c7c7c7;
    background: rgba(255, 255, 255, 0.98);
    color: #111827;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.16);
    padding: 10px 12px;
    pointer-events: none;
    font-size: 0.78rem;
    line-height: 1.3;
}

.bashpa-iec-capacity-hover-title {
    font-weight: 700;
    margin-bottom: 2px;
    color: #111827;
}

.bashpa-iec-capacity-hover-subtitle {
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 600;
}

.bashpa-iec-capacity-hover-sparkline {
    display: block;
    width: 100%;
    height: 72px;
    margin: 2px 0 6px;
}

.bashpa-iec-capacity-hover-sparkline .selected-window {
    fill: rgba(4, 107, 210, 0.1);
}

.bashpa-iec-capacity-hover-sparkline .axis {
    stroke: #d1d5db;
    stroke-width: 1;
}

.bashpa-iec-capacity-hover-sparkline .full-line {
    fill: none;
    stroke: #9ca3af;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bashpa-iec-capacity-hover-sparkline .highlight-line {
    fill: none;
    stroke: #046BD2;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bashpa-iec-capacity-hover-sparkline .endpoint {
    fill: #046BD2;
    stroke: #ffffff;
    stroke-width: 1.5;
}

.bashpa-iec-capacity-hover-sparkline text {
    fill: #6b7280;
    font-size: 8px;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.bashpa-iec-capacity-hover-sparkline .selected-label {
    fill: #046BD2;
    font-weight: 700;
}

.bashpa-iec-capacity-hover-table {
    width: 100%;
    border-collapse: collapse;
    border: 0 !important;
    outline: 0 !important;
    margin-top: 6px;
    color: #111827;
    font-size: 0.69rem;
    line-height: 1.25;
}

.bashpa-iec-capacity-hover-table th,
.bashpa-iec-capacity-hover-table td {
    border: 0 !important;
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
    font-weight: 500;
}

.bashpa-iec-capacity-hover-table thead th {
    color: #111827;
    font-weight: 700;
    text-align: right;
}

.bashpa-iec-capacity-hover-table tbody th {
    color: #4b5563;
    font-weight: 600;
}

.bashpa-iec-capacity-hover-table td {
    text-align: right;
}

.bashpa-iec-capacity-hover-table th + th,
.bashpa-iec-capacity-hover-table th + td,
.bashpa-iec-capacity-hover-table td + td,
.bashpa-iec-capacity-hover-table td + th {
    border-left: 1px solid #d1d5db !important;
}

.bashpa-iec-capacity-hover-table tbody tr + tr th,
.bashpa-iec-capacity-hover-table tbody tr + tr td {
    border-top: 1px solid #d1d5db !important;
}

.bashpa-iec-capacity-hover-table thead + tbody tr:first-child th,
.bashpa-iec-capacity-hover-table thead + tbody tr:first-child td {
    border-top: 1px solid #d1d5db !important;
}

.bashpa-iec-capacity-hover-table tr:first-child th,
.bashpa-iec-capacity-hover-table tr:first-child td {
    border-top: 0 !important;
}

.bashpa-iec-capacity-hover-table tr th:first-child,
.bashpa-iec-capacity-hover-table tr td:first-child {
    border-left: 0 !important;
}

.bashpa-iec-capacity-hover-table tr:last-child th,
.bashpa-iec-capacity-hover-table tr:last-child td {
    border-bottom: 0 !important;
}

.bashpa-iec-capacity-hover-table tr th:last-child,
.bashpa-iec-capacity-hover-table tr td:last-child {
    border-right: 0 !important;
}

.bashpa-iec-capacity-map-legend {
    display: grid;
    grid-template-columns: auto minmax(180px, 560px);
    align-items: end;
    justify-content: center;
    gap: 14px;
    margin: 12px auto 0;
    font-size: 0.78rem;
    color: #4b5563;
    width: 100%;
    max-width: 720px;
}

.bashpa-iec-capacity-map-legend-continuous {
    justify-items: stretch;
}

.bashpa-iec-capacity-map-no-data {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
    border: 0;
    background: transparent;
    color: #111827;
    font: inherit;
    font-size: 0.72rem;
    line-height: 1.15;
    cursor: pointer;
    padding: 0;
}

.bashpa-iec-capacity-map-no-data-swatch {
    width: 18px;
    height: 8px;
    border: 1px solid #cbd5e1;
    background: #f3f4f6;
}

.bashpa-iec-capacity-map-scale {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.bashpa-iec-capacity-map-scale-labels {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #4b5563;
    font-size: 0.72rem;
    line-height: 1.1;
}

.bashpa-iec-capacity-map-ramp-continuous {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: 8px;
    min-width: 0;
    border: 1px solid rgba(17, 24, 39, 0.26);
}

.bashpa-iec-capacity-map-segment {
    min-width: 0;
    min-height: 8px;
    height: 8px;
    border: 0;
    background: transparent;
    color: transparent;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.bashpa-iec-capacity-map-no-data.is-active,
.bashpa-iec-capacity-map-segment.is-active,
.bashpa-iec-capacity-map-no-data:hover,
.bashpa-iec-capacity-map-segment:hover,
.bashpa-iec-capacity-map-no-data:focus,
.bashpa-iec-capacity-map-segment:focus {
    outline: 1px solid #046BD2;
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .bashpa-iec-capacity-map-grid.has-comparison {
        grid-template-columns: 1fr;
    }

    .bashpa-iec-capacity-map {
        min-height: 320px;
    }

    .bashpa-iec-capacity-map-svg {
        height: 380px;
        min-height: 320px;
    }

    .bashpa-iec-capacity-map-legend {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .bashpa-iec-capacity-map-legend {
        max-width: 100%;
    }
}
