/* df-bnb-boss-stats.css
   Boss Stats pages (Sept 2026) — Infestation / Daily Ops / Head Hunt Boss Stats.
   Rendered by df-bnb-boss-stats.js from dist/boss_stats/<page>.json.

   WRITTEN GUIDES (flat prose) — .bs-guide
   Same component as .hto-guide (df-bnb-infestations.css), .ci-guide
   (df-bnb-camp-items.css), .as-guide (df-bnb-atom-shop.css) and .dm-guide
   (df-bnb-data-mining.css), re-declared under the bs- prefix because module
   stylesheets do not cross-import (style guide -> CSS Architecture). Keep them
   in step if any one of them changes.

   Deliberate departure (same as the Infestations guide): Boss Profiles keeps
   one <details> card per boss. Everything else on the page is flat, so the
   header card's Expand All / Close All are scoped to the boss cards only.

   Brand tokens only (--accent / --text / --panel / --panel2 / --stroke /
   --headBg / --headFg are declared on #df-bnb-shell by df-bnb-guide.css).
*/

/* ---------- Header card: title -> blurb -> [count + progress] -> divider -> search -> buttons ---------- */

.dfbnb-bs { font-family: inherit; }

.bs-top {
  background: color-mix(in srgb, var(--text) 3%, var(--panel));
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px 18px 16px;
  margin: 12px 0 14px;
}
.bs-top-title {
  font-size: 21px;
  font-weight: 950;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0;
}
.bs-top-sub {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  opacity: 0.80;
  margin: 8px 0 0;
}
.bs-top-pts {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.bs-top-count {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  opacity: 0.9;
}
.bs-prog {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.bs-prog-bar {
  flex: 1;
  min-width: 80px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  overflow: hidden;
}
.bs-prog-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.bs-prog-text { font-size: 0.85em; opacity: 0.8; min-width: 160px; }

.bs-top-divider {
  border: none;
  border-top: 1px solid var(--stroke);
  margin: 10px 0 0;
}
.bs-top-search {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 12px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--text) 8%, var(--panel));
  border: 1px solid var(--stroke2);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.bs-top-search::placeholder { color: var(--text); opacity: 0.45; }
.bs-top-search:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.bs-top-btnRow {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.bs-top-btn {
  background: color-mix(in srgb, var(--text) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s;
}
.bs-top-btn:hover { background: color-mix(in srgb, var(--text) 12%, var(--panel)); }

/* ---------- Guide panel + sections ---------- */

.bs-guide {
  background: color-mix(in srgb, #ffffff 18%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 18px;
  padding: 18px 22px 22px;
  margin-top: 18px;
}
.bs-guide-sec + .bs-guide-sec { margin-top: 48px; }

.bs-guide-h2 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--headFg, #e6d9b4);
  background: var(--headBg, #5b3f31);
  margin: 0 0 12px;
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  max-width: none;
  text-transform: none;
  letter-spacing: 0;
}

.bs-guide-body > * { margin: 0; }
.bs-guide-body > * + * { margin-top: 16px; }
.bs-guide-body p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 760px;
  margin: 0;
}
.bs-guide-body strong { font-weight: 900; color: var(--text); }
.bs-guide-body a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.bs-h3 {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text);
  margin: 28px 0 0 !important;
}
.bs-guide-body > .bs-h3 + * { margin-top: 10px; }

.bs-note {
  font-size: 0.9rem !important;
  opacity: 0.8;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- Head Hunt group heading (h3 + META tick + count) ---------- */

.bs-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px !important;
}
.bs-group-head .bs-h3 { margin: 0 !important; }
.bs-group-head + * { margin-top: 10px !important; }
.bs-group-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: color-mix(in srgb, #ffffff 45%, transparent);
  white-space: nowrap;
}
.bs-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}

/* ---------- Boss cards (the one surviving expand) ---------- */

.bs-cards { display: flex; flex-direction: column; gap: 10px; }

.bs-boss {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  background: rgba(245, 241, 227, 0.55);
  overflow: hidden;
}
.bs-boss--variant { background: rgba(245, 241, 227, 0.45); }

.bs-boss-head {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(245, 241, 227, 0.35);
}
.bs-boss-head::-webkit-details-marker,
.bs-boss-head::marker { display: none; content: ""; }
.bs-boss-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}

.bs-boss-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.bs-boss-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.bs-boss-photo {
  flex: 0 0 240px;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  line-height: 0;
}
.bs-boss-photo img { width: 100%; height: auto; display: block; }

.bs-boss-meta {
  flex: 1 1 260px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel2));
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.bs-meta-label { font-weight: 800; color: var(--accent); }

.bs-sub {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 8px;
  border-top: 1px solid var(--stroke);
  margin-top: 2px;
}

.bs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bs-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.bs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}

/* ---------- Tables ---------- */

.bs-tableWrap { max-width: none; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bs-table th,
.bs-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  vertical-align: top;
}
.bs-table th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.bs-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.bs-table td:first-child { font-weight: 700; }
.bs-table td { font-variant-numeric: tabular-nums; }
.bs-table--grouped td:first-child { color: var(--accent); font-weight: 800; white-space: nowrap; }
.bs-table--grouped td:nth-child(2) { font-weight: 700; }
.bs-table--resist td:first-child { font-weight: 400; }
.bs-table--resist th, .bs-table--resist td { text-align: center; }

@media (min-width: 761px) {
  .bs-table td:first-child { white-space: nowrap; }
}

/* ---------- Search highlight (DF cream override) ---------- */

.bs-guide mark.bnb-hl,
.bs-top mark.bnb-hl {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

/* ---------- States ---------- */

.bs-loading, .bs-error {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--text) 3%, var(--panel));
  font-weight: 700;
  opacity: 0.8;
}
.bs-error { background: rgba(255, 120, 120, 0.10); border-color: rgba(255, 120, 120, 0.35); }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .bs-guide { padding: 16px; }
  .bs-guide-h2 { font-size: 1.1rem; }
  .bs-guide-sec + .bs-guide-sec { margin-top: 36px; }

  /* Stacked card rows — header labels move inline via data-label. */
  .bs-table thead { display: none; }
  .bs-table, .bs-table tbody { display: block; }
  .bs-table tbody tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  }
  .bs-table tbody tr:nth-child(even) { background: none; }
  .bs-table tbody td {
    display: block;
    padding: 2px 0;
    border: none;
    white-space: normal;
  }
  .bs-table tbody td:first-child { font-weight: 800; font-size: 14px; color: var(--accent); }
  .bs-table tbody td:empty,
  .bs-table--grouped tbody td:first-child:empty { display: none; }
  .bs-table tbody td:not(:first-child)::before {
    content: attr(data-label) ":\00a0";
    font-weight: 700;
    opacity: 0.55;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .bs-table--resist thead { display: none; }
  .bs-table--resist tbody td { display: inline-block; margin-right: 12px; color: var(--text); font-weight: 400; font-size: 13px; }
  .bs-table--resist tbody td:first-child::before { content: attr(data-label) ":\00a0"; font-weight: 700; opacity: 0.55; font-size: 12px; text-transform: uppercase; }
  .bs-table--resist tbody td:first-child { font-size: 13px; font-weight: 400; color: var(--text); }
  .bs-boss-photo { flex-basis: 100%; }
}

@media (max-width: 560px) {
  .bs-top-btnRow { flex-direction: column; }
  .bs-top-btn { width: 100%; text-align: center; }
  .bs-boss-meta { font-size: 12px; padding: 6px 10px; }
  .bs-list li { font-size: 13px; }
  .bs-sub { font-size: 12px; }
  .bs-table tbody td { font-size: 13px; }
}
