/* stockidea.css — Stock Insights → Stock Ideas
   Small, page-specific additions only; the table/subtab/loading/empty
   states themselves reuse screener.css's .scr-* classes and valuemap.css's
   .vm-subtitle/.vm-updated, both already loaded on dashboard.html. */

.si-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}

.si-toolbar-desc {
  flex: 1 1 auto;
  min-width: 200px;
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.si-moat-filter-wrap {
  flex: 0 0 auto;
}

/* screener.css's .scr-rating-* palette is built for the Financial Health/
   Cash Flow/Growth/Profitability 5-tier scale (excellent..weak) and has no
   Wide/Narrow variants — .scr-rating-none is the only one that also applies
   to moat. Add Wide/Narrow using the same red/amber/green language as the
   Value Map's moat legend dots (valuemap.css .vm-moat-*) so the two pages
   read consistently. */
.scr-rating-wide   { color: #18B248; background: rgba(24, 178, 72, 0.12); }
.scr-rating-narrow { color: #d4a017; background: rgba(212, 160, 23, 0.12); }

/* Sortable column headers */
.si-th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.si-th-sortable:hover {
  color: var(--text-primary, #fff);
}

.si-sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  opacity: 0.5;
}

.si-th-sortable.si-sort-active .si-sort-arrow {
  opacity: 1;
}

/* Drag-to-reorder column headers */
.si-th-draggable {
  cursor: grab;
}

.si-th-dragging {
  opacity: 0.4;
}

.si-th-drag-over {
  box-shadow: inset 2px 0 0 var(--accent, #2dd4bf);
}

@media (max-width: 640px) {
  .si-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .si-moat-filter-wrap {
    width: 100%;
  }
}
