/* assets/top_industries.css
   Match Stage2 table format (screener-table + market-table)
   Keep it SMALL and authoritative (no legacy ti-* table rules needed)
*/

/* Page wrap: use the same wrapper spacing as Stage2 */
.ti-wrap{
  width: 100%;
  padding: 10px 10px 18px 10px; /* same vibe as .scr2-wrap */
}

/* Optional: keep results full width like other pages */
.ti-results{
  width: 100%;
}

/* =========================================================
   TOP INDUSTRIES — Tables (Stage2 look)
   Your tables already use:
     table table-dark table-hover market-table screener-table
   so we just style screener-table globally (same as Stage2)
   ========================================================= */

/* Remove base “sheet” behind bootstrap table */
table.screener-table.table-dark{
  --bs-table-bg: transparent !important;
  --bs-table-border-color: transparent !important;
  background-color: transparent !important;
  border-collapse: separate !important;
  border-spacing: 0;
}

/* HARD KILL borders everywhere */
table.screener-table,
table.screener-table *{
  border: 0 !important;
  outline: 0 !important;
}
table.screener-table,
table.screener-table > :not(caption) > * > *{
  box-shadow: none !important;
}

/* Header: UW dark */
table.screener-table.table-dark > thead > tr > th{
  background-color: rgba(6,6,6,.96) !important;
  color: rgba(255,255,255,.75) !important;
  font-size: 11px;
  letter-spacing: .35px;
  padding: 10px 10px;
  text-align: center;
  vertical-align: middle;
  position: sticky;
  top: 0;
  z-index: 3;

  /* no separators */
  border: 0 !important;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.06) !important;
}

/* Body cells */
table.screener-table.table-dark > tbody > tr > *{
  padding: 9px 10px;
  color: rgba(255,255,255,.86) !important;
  vertical-align: middle;
  background-color: rgba(0,0,0,.58) !important;
}

/* Zebra */
table.screener-table.table-dark > tbody > tr:nth-child(odd) > *{
  background-color: rgba(0,0,0,.62) !important;
}
table.screener-table.table-dark > tbody > tr:nth-child(even) > *{
  background-color: rgba(0,0,0,.52) !important;
}

/* Hover (UW) */
table.screener-table.table-hover > tbody > tr:hover > *{
  background-color: rgba(255,255,255,.040) !important;
  color: rgba(255,255,255,.95) !important;
  box-shadow: none !important; /* Stage2 ended up no “borders” */
}

/* First column: ticker cell alignment like Stage2 */
table.screener-table tbody td:nth-child(1){
  text-align: left !important;
  white-space: nowrap;
}

/* Left-align the Name column (2nd column) like Stage2 */
table.screener-table tbody td:nth-child(2){
  text-align: left !important;
}

/* Ticker link hover bold like Stage2 */
.ticker-link:hover{
  font-weight: bold;
}

/* OPTIONAL (only if you want same narrow columns as Stage2 when present)
   If your "stocks" table has Stage2 Rating and Squeeze columns in positions 10/11 */
table.screener-table th:nth-child(10),
table.screener-table td:nth-child(10),
table.screener-table th:nth-child(11),
table.screener-table td:nth-child(11){
  max-width: 80px;
  white-space: nowrap;
}
/* assets/top_industries.css */

/* same wrapper vibe as Stage2 pages */
.ti-wrap{
  width: 100%;
  padding: 10px 10px 18px 10px;
}

/* keep your results centered */
.ti-results{
  max-width: 1400px;
  margin: 0 auto;
}

/* =========
   TABLES — match Stage2 (no borders, dark zebra, fixed columns)
   ========= */

.ti-wrap table.screener-table{
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  table-layout: fixed;                 /* ✅ makes all tables line up */
  --bs-table-bg: transparent !important;
  --bs-table-border-color: transparent !important;
}

/* kill borders everywhere */
.ti-wrap table.screener-table,
.ti-wrap table.screener-table *{
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* header */
.ti-wrap table.screener-table.table-dark > thead > tr > th{
  background-color: rgba(6,6,6,.96) !important;
  color: rgba(255,255,255,.75) !important;
  font-size: 11px;
  letter-spacing: .35px;
  padding: 10px 10px;
  position: sticky;
  top: 0;
  z-index: 3;
}

/* body cells + zebra */
.ti-wrap table.screener-table.table-dark > tbody > tr > *{
  padding: 9px 10px;
  color: rgba(255,255,255,.86) !important;
  background-color: rgba(0,0,0,.58) !important;
  vertical-align: middle;
}

.ti-wrap table.screener-table.table-dark > tbody > tr:nth-child(odd) > *{
  background-color: rgba(0,0,0,.62) !important;
}
.ti-wrap table.screener-table.table-dark > tbody > tr:nth-child(even) > *{
  background-color: rgba(0,0,0,.52) !important;
}

/* hover */
.ti-wrap table.screener-table.table-hover > tbody > tr:hover > *{
  background-color: rgba(255,255,255,.040) !important;
  color: rgba(255,255,255,.95) !important;
}

/* =========
   COLUMN WIDTHS — stock table
   Keep columns consistent across ALL SIC sections
   ========= */

.ti-wrap table.ti-stock-table th:nth-child(1),
.ti-wrap table.ti-stock-table td:nth-child(1){ width: 150px; } /* ticker + logo */

.ti-wrap table.ti-stock-table th:nth-child(2),
.ti-wrap table.ti-stock-table td:nth-child(2){ width: 260px; } /* name */

.ti-wrap table.ti-stock-table th:nth-child(3),
.ti-wrap table.ti-stock-table td:nth-child(3){ width: 90px; }  /* last */

.ti-wrap table.ti-stock-table th:nth-child(4),
.ti-wrap table.ti-stock-table td:nth-child(4){ width: 110px; } /* vol */

.ti-wrap table.ti-stock-table th:nth-child(5),
.ti-wrap table.ti-stock-table td:nth-child(5){ width: 120px; } /* avg vol */

.ti-wrap table.ti-stock-table th:nth-child(6),
.ti-wrap table.ti-stock-table td:nth-child(6){ width: 110px; } /* vol dif */

.ti-wrap table.ti-stock-table th:nth-child(7),
.ti-wrap table.ti-stock-table td:nth-child(7){ width: 70px; }  /* rsi */

.ti-wrap table.ti-stock-table th:nth-child(8),
.ti-wrap table.ti-stock-table td:nth-child(8){ width: 90px; }  /* rs */

.ti-wrap table.ti-stock-table th:nth-child(9),
.ti-wrap table.ti-stock-table td:nth-child(9){ width: 90px; }  /* rs3m */

.ti-wrap table.ti-stock-table th:nth-child(10),
.ti-wrap table.ti-stock-table td:nth-child(10){ width: 110px; } /* stage2 */

.ti-wrap table.ti-stock-table th:nth-child(11),
.ti-wrap table.ti-stock-table td:nth-child(11){ width: 90px; } /* squeeze */

.ti-wrap table.ti-stock-table th:nth-child(12),
.ti-wrap table.ti-stock-table td:nth-child(12){ width: 90px; } /* daily */

.ti-wrap table.ti-stock-table th:nth-child(13),
.ti-wrap table.ti-stock-table td:nth-child(13){ width: 90px; } /* ytd */

.ti-wrap table.ti-stock-table th:nth-child(14),
.ti-wrap table.ti-stock-table td:nth-child(14){ width: 90px; } /* 52w */

/* keep long names tidy */
.ti-wrap table.ti-stock-table td:nth-child(2){
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Make each table feel like one continuous zebra block */
.ti-stock-stack .market-card{
  margin-bottom: 14px !important;
}

/* Ensure table truly spans container (no dead space) */
.ti-stock-stack table.ti-stock-table{
  width: 100% !important;
  table-layout: fixed;
}

/* Force row background to feel full-width (not just cell islands) */
.ti-stock-stack table.ti-stock-table tbody tr{
  background: rgba(0,0,0,.58) !important;
}
.ti-stock-stack table.ti-stock-table tbody tr:nth-child(odd){
  background: rgba(0,0,0,.62) !important;
}
.ti-stock-stack table.ti-stock-table tbody tr:nth-child(even){
  background: rgba(0,0,0,.52) !important;
}

/* Cells inherit row bg (no separate patches) */
.ti-stock-stack table.ti-stock-table tbody td{
  background: transparent !important;
}
/* =========================
   Top Industries — widen Name column
   ========================= */

/* Force wider Name column everywhere */
.ti-stock-table th:nth-child(2),
.ti-stock-table td:nth-child(2){
  width: 350px;          /* adjust if you want more */
  min-width: 350px;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Optional: allow hover reveal */
.ti-stock-table td:nth-child(2):hover{
  white-space: normal;
}
/* =========================
   Dark dropdowns (Top Industries)
   ========================= */

.scr2-dd-toggle{
  background: rgba(0,0,0,.55) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  color: rgba(255,255,255,.90) !important;
}

.scr2-dd-toggle:hover,
.scr2-dd-toggle:focus{
  background: rgba(0,0,0,.70) !important;
  color: #fff !important;
}

/* Dropdown menu */
.dropdown-menu{
  background: #0b0b0f !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}

/* Dropdown items */
.dropdown-menu .dropdown-item{
  color: rgba(255,255,255,.85) !important;
  background: transparent !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus{
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}
/* =========================
   Remove grey slab below tables
   ========================= */

.market-card{
  background: transparent !important;
  box-shadow: none !important;
}

.market-card-body{
  background: transparent !important;
}
.scr2-wrap .market-card,
.scr2-wrap .market-card-body{
  background: transparent !important;
  box-shadow: none !important;
}
/* Center #Tickers column header + values */
.ti-sic-table thead th:nth-child(2),
.ti-sic-table tbody td:nth-child(2){
  text-align: center !important;
}
/* Center #Tickers column header + values */
.ti-sic-table thead th:nth-child(2),
.ti-sic-table tbody td:nth-child(2){
  text-align: center !important;
}
/* SIC Description column width control */
.ti-sic-table thead th:first-child,
.ti-sic-table tbody td:first-child{
  max-width: 420px;
  width: 420px;
  white-space: normal;
}
/* Big blue section headers */
.market-card-body > .scr2-subtitle{
  font-size: 1.45rem;      /* ⬆ bigger */
  font-weight: 900;
  color: #64b5f6;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}
/* SIC industry titles above stock tables */
.market-card-body .scr2-subtitle.mb-2{
  font-size: 0.95rem;      /* ⬇ smaller */
  font-weight: 700;
  color: #64b5f6;
  opacity: 0.9;
  letter-spacing: 0.3px;
}
/* =========================================
   FIX: "SIC Top Stocks" stack indentation
   (remove nested CardBody padding)
   ========================================= */

/* Main results cards on this page: no side padding */
.ti-wrap .market-card > .market-card-body{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Inside the SIC Top Stocks stack: no extra padding/margins */
.ti-wrap .ti-stock-stack{
  margin: 0 !important;
  padding: 0 !important;
}

/* Each SIC section card inside the stack: flush left */
.ti-wrap .ti-stock-stack .market-card{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Kill the default CardBody padding that causes the indent */
.ti-wrap .ti-stock-stack .market-card > .market-card-body{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Optional: keep only a small vertical gap between SIC sections */
.ti-wrap .ti-stock-stack .market-card{
  margin-bottom: 14px !important;
}
/* =========================================
   FIX: #Tickers column alignment (SIC table)
   ========================================= */

/* Header */
.ti-sic-table thead th:nth-child(2){
  text-align: center !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Body cells */
.ti-sic-table tbody td:nth-child(2){
  text-align: center !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}
/* =========================================
   MAIN blue section titles
   ========================================= */
.market-card-body > .scr2-subtitle{
  font-size: 1.7rem;        /* ⬆ bigger */
  font-weight: 900;
  color: #64b5f6;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}
/* =========================================
   SIC group titles (above stock tables)
   ========================================= */
.market-card-body .scr2-subtitle.mb-2{
  font-size: 1.05rem;       /* slightly bigger, but not dominant */
  font-weight: 700;
  color: #64b5f6;
  opacity: 0.9;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}
/* =========================
   Top Industries — BIG blue titles (force)
   ========================= */

/* Main section title: SIC Top Stocks */
.scr2-subtitle{
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  color: #64b5f6 !important;
  letter-spacing: 0.6px;
}

/* Industry title (Oil & Gas Field Machinery & Equipment) */
.scr2-subtitle.mb-2{
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #64b5f6 !important;
  letter-spacing: 0.4px;
  margin-top: 6px;
}
/* SIC Summary: center SIC N */
.ti-sic-table thead th:nth-child(1),
.ti-sic-table tbody td:nth-child(1){
  text-align: center !important;
  width: 90px;
  max-width: 90px;
  white-space: nowrap;
}
