﻿/* ── Desktop: chart fills remaining vertical space ── */
.dashContentColumn {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
/* Keep filter / time-range / stat-card sections at natural height */
.dashContentColumn > :not(.dashChartArea) {
    flex-shrink: 0;
}
/* Chart area fills the remaining vertical space */
.dashChartArea {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
}
/* Pass height through ko:template wrappers to the canvas container */
.dashChartArea > div,
.dashChartArea > div > div {
    height: 100%;
}
.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Time range selector (Google Finance style) ── */
.dashTimeRange {
    padding: 4px 8px 2px;
}
.dashTimeRangeLinks {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.dashTimeLink {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
    line-height: 1.4;
}
.dashTimeLink:hover {
    color: #1a73e8;
}
.dashTimeLink.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 600;
}
.dashTimeLinkAction {
    color: #1a73e8;
    font-size: 12px;
}
.dashTimeLinkToggle {
    color: dodgerblue;
    font-weight: 600;
}
.dashTimeSep {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: #dadce0;
    margin: 0 8px;
    vertical-align: middle;
}

/* ── Stat cards row ── */
.dashStatsRow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 8px 8px;
}
.dashStatCard {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 220px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #1a73e8;
    border-radius: 8px;
    padding: 10px 14px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}
/* Net/Potential card needs extra width for combined values like "$1,855,083/$1,989,842" */
.dashStatCard.dashStatCardWide {
    flex: 1.5 1 180px;
    max-width: 300px;
}
.dashStatCard:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.dashStatLabel {
    font-size: 13px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.dashStatGrid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    align-items: baseline;
}
.dashStatMeta {
    font-size: 11px;
    color: #80868b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.dashStatValue {
    font-size: 15px;
    font-weight: 700;
    color: #1a73e8;
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.dashStatSelected {
    color: #7c3aed;
}

/* ── Dashboard toolbar rows ── */
.dashToolbarRow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 2px 8px;
    min-height: 28px;
}
.dashToolbarSep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #dadce0;
    margin: 0 4px;
    vertical-align: middle;
}
/* Remove label from Dashboard Type dropdown */
#DashboardManagerMenu .ToolbarDropDownVMTemplate span:first-child:empty,
#idDashboardManagerMenuDiv > div > span:first-child {
    display: none;
}
/* Row 2: reseller + filter side by side */
#dashToolbarRow2 {
    gap: 6px;
}
#dashToolbarRow2 #dashResellerRow {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
    padding: 0;
}
#dashToolbarRow2 #dashMobileFilterBar {
    display: none;
    flex: 1;
    min-width: 140px;
    max-width: 220px;
    gap: 6px;
    align-items: center;
}
/* Filter button (desktop + mobile) */
.dash-filter-open-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 13px;
    color: #3c4043;
    cursor: pointer;
    flex: 1;
    height: 22px;
    transition: background 0.15s, border-color 0.15s;
}
.dash-filter-open-btn:hover {
    background: #e8eaed;
    border-color: #bdc1c6;
}
.dash-filter-open-btn i {
    color: #5f6368;
}
.dash-filter-clear-btn {
    padding: 2px 8px;
    background: transparent;
    border: 1px solid #f28b82;
    border-radius: 6px;
    font-size: 12px;
    color: #d93025;
    cursor: pointer;
    white-space: nowrap;
    height: 22px;
    transition: background 0.15s;
}
.dash-filter-clear-btn:hover {
    background: #fce8e6;
}

/* ── Legacy chart-styles kept for backward compat ── */
.chartButtonRow {
    display: none; /* replaced by .dashTimeRange */
}

.chartButtonRowCell {
    display: none; /* replaced by .dashStatsRow */
}

.chartDetailsHeaderRow {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.chartDetailsHeaderColumn {
    text-align: end;
    font-weight: bold;
    font-size: 14px;
}

.chartDetailsDetailsRow {
    text-align: center;
    margin-left: 4px;
    font-weight: bold;
    color: blue;
}