/* ===========================
   FPL360 War Room (Tier 2)
   Scoped styles
   =========================== */

.fpl-wr{ font-family: inherit; }

/* ---------- Player images (FIX) ---------- */
/* This targets the <img class="pl-img"> we render in JS */
.fpl-wr .pl-img-wrap{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  overflow:hidden;
  background:#eef2f7;
  border:1px solid rgba(0,0,0,.10);
}

.fpl-wr img.pl-img{
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 999px !important;
  display:block !important;
}

/* Align image + name nicely in captain bars */
.fpl-wr .fpl-wr-bar-name{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Align image + name nicely in ownership list */
.fpl-wr .li-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.fpl-wr .li-name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Align image + name in what-if table */
.fpl-wr .cell-player{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.fpl-wr .cell-player span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- Existing UI ---------- */

.fpl-wr-topbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  margin-bottom:14px;
  gap:12px;
}

.fpl-wr-brand{
  display:flex; align-items:center; gap:10px;
  font-size:14px; color:#111;
}
.fpl-wr-tag{
  font-size:12px;
  font-weight:800;
  color:#111;
  background:#f5f7fb;
  border:1px solid rgba(0,0,0,.08);
  padding:4px 10px;
  border-radius:999px;
}

.fpl-wr-pills{ display:flex; gap:10px; flex-wrap:wrap; }
.fpl-wr-pill{
  background:#f5f7fb;
  border:1px solid rgba(0,0,0,.08);
  color:#111;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.fpl-wr-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  overflow:hidden;
}

.fpl-wr-card-hd{
  display:flex; justify-content:space-between; align-items:flex-start;
  padding:16px 18px;
  border-bottom:1px solid rgba(0,0,0,.08);
  gap:14px;
}

.fpl-wr-title{ min-width:240px; }
.fpl-wr-league{
  color:#111;
  font-weight:900;
  font-size:16px;
  line-height:1.15;
}
.fpl-wr-sub{
  color:#667;
  font-weight:700;
  font-size:12px;
  margin-top:6px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.fpl-wr-dot{ opacity:.6; }

.fpl-wr-actions{
  display:flex; align-items:flex-end; gap:10px;
  flex-wrap:wrap;
}

.fpl-wr-select{ display:flex; flex-direction:column; gap:6px; min-width:240px; }
.fpl-wr-select-label{ font-size:12px; font-weight:900; color:#667; }
.fpl-wr-select-input{
  width:100%;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  padding:10px 10px;
  border-radius:12px;
  font-size:13px;
  font-weight:800;
  outline:none;
}

/* Classic League: horizontal pill selector */
.fpl-wr-pillrow{
  display:flex;
  gap:8px;
  align-items:center;
  overflow:auto;
  padding:4px 2px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.fpl-wr-pillrow::-webkit-scrollbar{ height:8px; }
.fpl-wr-pillrow::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.15); border-radius: 999px; }
.fpl-wr-pillrow-empty{ color:#667; font-weight:800; font-size:12px; padding:8px 0; }

.fpl-wr-pillopt{
  appearance:none;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  padding:8px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  white-space:nowrap;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.fpl-wr-pillopt:hover{ border-color: rgba(0,0,0,.18); }
.fpl-wr-pillopt:active{ transform: translateY(1px); }
.fpl-wr-pillopt.is-active{
  background:#111;
  color:#fff;
  border-color: rgba(0,0,0,.35);
}

.fpl-wr-select-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

.fpl-wr-btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:#111;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.fpl-wr-status{
  font-size:12px;
  color:#667;
  font-weight:800;
  padding-bottom:2px;
}

.fpl-wr-kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:12px;
  padding:14px 18px;
}

.fpl-wr-kpi{
  background:#f7f9fc;
  border:1px solid rgba(0,0,0,.07);
  border-radius:14px;
  padding:12px 12px;
}
.kpi-label{ font-size:12px; font-weight:900; color:#667; }
.kpi-value{ font-size:20px; font-weight:900; color:#111; margin-top:4px; }
.kpi-sub{ font-size:12px; color:#667; margin-top:4px; font-weight:700; }

.fpl-wr-grid{
  display:grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap:12px;
  padding:0 18px 18px 18px;
}

.fpl-wr-panel{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  overflow:hidden;
  grid-column: span 12;
}

.fpl-wr-panel-hd{
  padding:14px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px;
}

.fpl-wr-panel-title{
  font-size:14px;
  font-weight:900;
  color:#111;
}
.fpl-wr-panel-sub{
  font-size:12px;
  color:#667;
  font-weight:700;
  margin-top:4px;
}

.fpl-wr-badge{
  font-size:12px;
  font-weight:900;
  color:#111;
  background:#f5f7fb;
  border:1px solid rgba(0,0,0,.08);
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.fpl-wr-bars{ padding:12px 14px; }
.fpl-wr-empty{
  color:#667;
  font-weight:800;
  font-size:13px;
  text-align:center;
  padding:18px 10px;
}

.fpl-wr-barrow{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.fpl-wr-barrow:last-child{ border-bottom:none; }

.fpl-wr-bar-sub{ color:#667; font-weight:700; font-size:12px; margin-top:4px; }
.fpl-wr-bar-track{
  width:100%;
  height:10px;
  border-radius:999px;
  background:#f0f3f8;
  border:1px solid rgba(0,0,0,.06);
  overflow:hidden;
  margin-top:4px;
}
.fpl-wr-bar-fill{ height:100%; background:#111; border-radius:999px; }

.fpl-wr-mini-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
  padding:12px 14px 14px 14px;
  border-top:1px solid rgba(0,0,0,.08);
  background:#fafbfe;
}
.fpl-wr-mini{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:12px;
}
.mini-label{ font-size:12px; font-weight:900; color:#667; }
.mini-value{ font-size:15px; font-weight:900; color:#111; margin-top:4px; }
.mini-sub{ font-size:12px; font-weight:700; color:#667; margin-top:4px; }

.fpl-wr-table-wrap{ padding:0 14px 14px 14px; overflow:auto; }
.fpl-wr-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:720px;
}
.fpl-wr-table thead th{
  text-align:left;
  font-size:12px;
  color:#667;
  font-weight:900;
  padding:10px 10px;
  border-bottom:1px solid rgba(0,0,0,.10);
}
.fpl-wr-table tbody td{
  padding:10px 10px;
  border-bottom:1px solid rgba(0,0,0,.06);
  font-size:13px;
  color:#111;
}
.fpl-wr-table .rowlabel{
  font-weight:900;
  color:#111;
  width:180px;
}
.muted{ color:#667; text-align:center; padding:18px 10px; font-weight:800; }

.fpl-wr-two-col{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  padding:12px 14px 14px 14px;
}
.fpl-wr-listbox{
  background:#f7f9fc;
  border:1px solid rgba(0,0,0,.07);
  border-radius:14px;
  padding:12px;
}
.listbox-title{ font-weight:900; color:#111; font-size:13px; }
.listbox-sub{ color:#667; font-weight:700; font-size:12px; margin-top:4px; }
.fpl-wr-list{ list-style:none; margin:10px 0 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }

.fpl-wr-li{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:10px 10px;
}

.li-pill{
  font-size:12px;
  font-weight:900;
  color:#111;
  background:#f5f7fb;
  border:1px solid rgba(0,0,0,.08);
  padding:4px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.fpl-wr-note{
  padding:0 14px 14px 14px;
  color:#667;
  font-weight:800;
  font-size:12px;
}

/* Responsive */
@media (max-width: 980px){
  .fpl-wr-kpi-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fpl-wr-card-hd{ flex-direction:column; align-items:flex-start; }
  .fpl-wr-actions{ width:100%; }
  .fpl-wr-select{ min-width:0; width:100%; }
  .fpl-wr-btn{ width:100%; }
  .fpl-wr-barrow{ grid-template-columns: 1fr; }
  .fpl-wr-mini-grid{ grid-template-columns: 1fr; }
  .fpl-wr-two-col{ grid-template-columns: 1fr; }
  .fpl-wr-table{ min-width: 680px; }
}
/* --- FIX: Player name text showing white (force dark text) --- */
.fpl-wr,
.fpl-wr *{
  color: inherit;
}

.fpl-wr .fpl-wr-bar-name,
.fpl-wr .fpl-wr-bar-sub,
.fpl-wr .li-name,
.fpl-wr .li-pill,
.fpl-wr .cell-player span,
.fpl-wr .fpl-wr-table tbody td,
.fpl-wr .fpl-wr-table .rowlabel{
  color: #111 !important;
}

.fpl-wr .fpl-wr-panel-sub,
.fpl-wr .kpi-label,
.fpl-wr .kpi-sub,
.fpl-wr .mini-label,
.fpl-wr .mini-sub,
.fpl-wr .listbox-sub,
.fpl-wr .muted,
.fpl-wr .fpl-wr-note{
  color: #667 !important;
}
/* ===========================
   PATCH: Fix messed-up top/header colors
   (Theme was forcing white text; inherit made it worse)
   Put this at the END of war-room.css
   =========================== */

/* Lock the War Room base text color */
.fpl-wr{
  color:#111 !important;
}

/* Topbar + header: force readable colors */
.fpl-wr .fpl-wr-topbar,
.fpl-wr .fpl-wr-card-hd,
.fpl-wr .fpl-wr-title,
.fpl-wr .fpl-wr-actions{
  color:#111 !important;
}

/* Topbar brand + tag */
.fpl-wr .fpl-wr-brand{ color:#111 !important; }
.fpl-wr .fpl-wr-tag{
  color:#111 !important;
  background:#f5f7fb !important;
  border-color: rgba(0,0,0,.08) !important;
}

/* Pills */
.fpl-wr .fpl-wr-pill{
  color:#111 !important;
  background:#f5f7fb !important;
  border-color: rgba(0,0,0,.08) !important;
}

/* Subtext in header areas */
.fpl-wr .fpl-wr-sub,
.fpl-wr .fpl-wr-panel-sub,
.fpl-wr .fpl-wr-status,
.fpl-wr .kpi-label,
.fpl-wr .kpi-sub,
.fpl-wr .mini-label,
.fpl-wr .mini-sub,
.fpl-wr .listbox-sub,
.fpl-wr .muted,
.fpl-wr .fpl-wr-note{
  color:#667 !important;
}

/* Select labels + inputs */
.fpl-wr .fpl-wr-select-label{ color:#667 !important; }
.fpl-wr .fpl-wr-select-input{
  color:#111 !important;
  background:#fff !important;
  border-color: rgba(0,0,0,.10) !important;
}

/* Buttons */
.fpl-wr .fpl-wr-btn{
  background:#111 !important;
  color:#fff !important;
  border-color: rgba(0,0,0,.12) !important;
}

/* Player name text (ownership + bars + tables) */
.fpl-wr .fpl-wr-bar-sub,
.fpl-wr 
.fpl-wr .li-pill,
.fpl-wr .fpl-wr-table tbody td,
.fpl-wr .fpl-wr-table .rowlabel{
  color:#111 !important;

}
/* Player name text (ownership + bars + tables) */
.fpl-wr .fpl-wr-bar-name,
.fpl-wr .li-name {
  color:#111 !important;
  font-size:14px;
  font-weight:900;
}

/* ======================================================
   TABLE EMPHASIS UPGRADE (Captain What-If + Rival Compare)
   ====================================================== */

/* Base table reset */
.fplci-table,
.fplci-table th,
.fplci-table td,
.fplcs table,
.fplcs table th,
.fplcs table td{
  font-family: var(--font-main, 'Manrope', system-ui);
}

/* Table headers — stronger, clearer */
.fplci-table thead th,
.fplcs table thead th{
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #475569 !important;        /* slate */
  background: #f8fafc !important;
}

/* Row labels (Captain, Team, Manager, GW, Total…) */
.fplci-table tbody td:first-child,
.fplcs table tbody td:first-child{
  font-weight: 900 !important;
  color: #0b1220 !important;
  font-size: 14px;
}

/* Main values (names, captains, teams) */
.fplci-table tbody td,
.fplcs table tbody td{
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0b1220 !important;
}

/* Numeric emphasis (points, totals, deltas) */
.fplci-table .num,
.fplci-table td.impact,
.fplcs table .num,
.fplcs-big,
.fplcs-stat .v{
  font-weight: 950 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

/* Positive / negative deltas */
.fplci-table td.good,
.fplci-table td.plus,
.pos{
  color: #15803d !important;   /* green */
  font-weight: 950 !important;
}

.fplci-table td.bad,
.fplci-table td.minus,
.neg{
  color: #b42318 !important;   /* red */
  font-weight: 950 !important;
}

/* Zero / neutral */
.fplci-table td.zero,
.neutral{
  color: #475569 !important;
  font-weight: 800 !important;
}

/* Captain names pop */
.fplci-table td:nth-child(2),
.fplcs-own-hd .nm,
.fplcs-playerline b{
  font-weight: 950 !important;
  font-size: 15px;
}

/* Table row height & breathing room */
.fplci-table th,
.fplci-table td,
.fplcs table th,
.fplcs table td{
  padding: 14px 14px !important;
}

/* Subtle row hover (confidence, not flash) */
.fplci-table tbody tr:hover,
.fplcs table tbody tr:hover{
  background: #f8fafc !important;
}

/* Section titles above tables */
.fplci-card-title,
.fplcs-h{
  font-size: 17px !important;
  font-weight: 950 !important;
  letter-spacing: -.3px;
  color: #0b1220 !important;
}

/* Small helper text under titles */
.fplci-card-hint,
.fplcs-sub{
  font-size: 13px;
  font-weight: 700;
  color: #64748b !important;
}
