/* WindWatch Forecasting compact polish */
body.ww-forecasting-compact {
  --ww-fc-font-xs: 10px;
  --ww-fc-font-sm: 11px;
  --ww-fc-pad-xs: 4px;
  --ww-fc-pad-sm: 6px;
}

/* Make Forecasting cards slightly tighter */
body.ww-forecasting-compact .ww-fc-card,
body.ww-forecasting-compact .ww-fc-right-rail {
  gap: 10px !important;
}

/* Compact all detected Forecasting FER/KPI tables */
body.ww-forecasting-compact table.ww-fc-compact-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: auto !important;
}

body.ww-forecasting-compact table.ww-fc-compact-table th,
body.ww-forecasting-compact table.ww-fc-compact-table td {
  padding: 5px 5px !important;
  font-size: 10.5px !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  vertical-align: middle !important;
}

/* Prevent values like 0.28 + % from splitting into two rows */
body.ww-forecasting-compact table.ww-fc-compact-table td *,
body.ww-forecasting-compact table.ww-fc-compact-table th * {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* Right-side FER snapshot needs extra compression */
body.ww-forecasting-compact table.ww-fc-fer-snapshot th,
body.ww-forecasting-compact table.ww-fc-fer-snapshot td {
  padding: 4px 4px !important;
  font-size: 10px !important;
  line-height: 1.04 !important;
}

body.ww-forecasting-compact table.ww-fc-fer-snapshot th:first-child,
body.ww-forecasting-compact table.ww-fc-fer-snapshot td:first-child {
  min-width: 66px !important;
  max-width: 74px !important;
  font-size: 10px !important;
  text-align: left !important;
}

body.ww-forecasting-compact table.ww-fc-fer-snapshot th:not(:first-child),
body.ww-forecasting-compact table.ww-fc-fer-snapshot td:not(:first-child) {
  min-width: 42px !important;
  max-width: 58px !important;
  text-align: center !important;
}

/* Keep FER % in one line */
body.ww-forecasting-compact table.ww-fc-fer-snapshot td:nth-child(5),
body.ww-forecasting-compact table.ww-fc-fer-snapshot td:nth-child(5) * {
  white-space: nowrap !important;
  display: inline !important;
}

/* Compact right-side Forecasting control card */
body.ww-forecasting-compact .ww-fc-right-rail button,
body.ww-forecasting-compact .ww-fc-right-rail input,
body.ww-forecasting-compact .ww-fc-right-rail select {
  min-height: 34px !important;
  font-size: 12px !important;
}

body.ww-forecasting-compact .ww-fc-right-rail table {
  margin-top: 4px !important;
}

/* Compact date range labels/inputs */
body.ww-forecasting-compact .ww-fc-right-rail label,
body.ww-forecasting-compact .ww-fc-right-rail [class*="label"] {
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
}

body.ww-forecasting-compact .ww-fc-right-rail input[type="date"] {
  height: 34px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
}

/* Main KPI summary table: compact but readable */
body.ww-forecasting-compact table.ww-fc-kpi-summary th,
body.ww-forecasting-compact table.ww-fc-kpi-summary td {
  padding: 7px 8px !important;
  font-size: 11.5px !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
}

body.ww-forecasting-compact table.ww-fc-kpi-summary td:first-child,
body.ww-forecasting-compact table.ww-fc-kpi-summary th:first-child {
  min-width: 180px !important;
}

/* Slightly reduce vertical waste around Forecasting page panels */
body.ww-forecasting-compact .ww-fc-tight-block {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
