/* ═══════════════════════════════════════════════════════════════════════════
   Classifiers App — Application-specific overrides.
   Loaded AFTER ui-kit.css for layout rules tied to this app's structure.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Section layout rules ── */
#train-section { flex-shrink: 0; overflow: visible; }
#test-section  { flex: 1; min-height: 0; }
#import-section { flex-shrink: 0; max-height: 240px; }
#try-section    { flex: 1; min-height: 0; overflow: auto; }

/* ── Train card header (title + button side-by-side) ── */
.train-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.train-card-header h2 { margin-bottom: 0; }

/* ── Train form ── */
.train-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Session model list uses .ui-list / .ui-list-row / .ui-list-tag / .ui-list-empty from ui-kit */

/* ── Import disk row ── */
.import-disk-row { display: flex; gap: 7px; align-items: center; flex-shrink: 0; margin-bottom: 2px; }
.import-disk-row select {
  flex: 1; min-width: 0; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 0; color: var(--text); font-size: 12px; padding: 5px 8px;
  outline: none; font-family: var(--font); transition: border-color 0.15s;
}
.import-disk-row select:focus { border-color: var(--accent); }

/* ── Sticky-table app-specific classes ── */
.corner-cell {
  min-width: 90px;
  position: sticky;
  left: 0;
  z-index: 3;
}
.model-col-head { min-width: 90px; }
.col-model-name { font-size: 12px; font-weight: 600; color: var(--text); }
.metrics-section-row > td {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 10px 3px;
  border-top: 1px solid var(--border);
}
.metrics-section-row:first-child > td { border-top: none; }
th.metric-label {
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 5px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 2;
}
.cfg-cell { color: var(--text-muted); font-size: 11px; }

/* ── Colour helpers ── */
.pred-label { font-size: 13px; font-weight: 700; color: var(--accent); }
.pred-model-name { color: var(--text-muted); font-size: 12px; }
.conf-high  { color: var(--success); }
.conf-low   { color: var(--text-muted); }
.acc-high   { color: var(--success); }
.acc-med    { color: var(--warn); }
.acc-low    { color: var(--danger); }

/* ── Prediction table (uses generic .ui-table via class, but ID selectors for specificity) ── */
.pred-wrap {
  flex-shrink: 0; margin-top: 12px;
  border: 1px solid var(--border); border-radius: 0; overflow: hidden;
}

/* ── Metrics table wrap ── */
.metrics-wrap {
  flex: 1; min-height: 0; margin-top: 10px; overflow: auto;
  border: 1px solid var(--border); border-radius: 0;
}
/* scrollbar: use .ui-scrollbar-thin class on element */

/* Collapsibles use .ui-collapsible from ui-kit */
.ui-collapsible .form-row { padding: 0 10px; }
.ui-collapsible .form-row:last-child { padding-bottom: 6px; }

/* ── Model info panel (content inside details) ── */
.model-info-panel {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  overflow-y: auto;
  max-height: 280px;
}
.model-info-panel h2 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.model-info-panel h3 { font-size: 12px; font-weight: 600; margin: 10px 0 4px; color: var(--text-muted); }
.model-info-panel p { margin: 4px 0; }
.model-info-panel ul, .model-info-panel ol { margin: 4px 0; padding-left: 18px; }
.model-info-panel li { margin: 2px 0; }
.model-info-panel pre {
  background: var(--surface);
  padding: 8px 10px;
  border-radius: 0;
  overflow-x: auto;
  font-size: 11px;
  line-height: 1.4;
}
.model-info-panel code { font-size: 11px; }
.model-info-panel strong { color: var(--text); }

/* ── Test header with ensemble button ── */
.test-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.test-header h2 { margin-bottom: 0; }
.test-header-btns { display: flex; gap: 6px; }

/* ── Chart area ── */
.chart-area { margin-bottom: 10px; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
.chart-area canvas { width: 100%; display: block; }

/* Session model params uses .ui-list-tag from ui-kit */

/* ── Responsive overrides for app-specific sections ── */
@media (max-width: 900px) {
  #test-section { min-height: 280px; }
  #import-section { max-height: none; }
  #try-section { overflow: visible; min-height: 320px; }
}
