/* ==========================================================================
   Wills Massive Pickem - stylesheet
   Deliberately plain, early-2010s Bootstrap-3-default look.
   White background, Helvetica body / Times New Roman h1, blue links+buttons,
   plain gray-bordered tables. No shadows, no gradients, minimal transitions.
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #333333;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
}

#page {
  max-width: 1150px;
  margin: 0 auto;
  padding: 20px 15px 40px 15px;
}

a {
  color: #337ab7;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #23527c;
  text-decoration: underline;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

#site-header {
  margin-bottom: 10px;
}

h1 {
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: 28px;
  margin: 0 0 4px 0;
  color: #222222;
}

h2 {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 10px 0;
  color: #222222;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 6px;
}

.tagline {
  margin: 0 0 15px 0;
  font-size: 12px;
  color: #777777;
}

/* ---------------------------------------------------------------------- */
/* Status line                                                            */
/* ---------------------------------------------------------------------- */

#status-line {
  min-height: 0;
}

#status-line:empty {
  display: none;
}

#status-line.status-error {
  background: #f2dede;
  color: #a94442;
  border: 1px solid #ebccd1;
  padding: 8px 12px;
  margin-bottom: 15px;
}

#status-line.status-info {
  background: #d9edf7;
  color: #31708f;
  border: 1px solid #bce8f1;
  padding: 8px 12px;
  margin-bottom: 15px;
}

/* ---------------------------------------------------------------------- */
/* Tab bar                                                                 */
/* ---------------------------------------------------------------------- */

#tab-bar {
  border-bottom: 1px solid #dddddd;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.tab-link {
  display: inline-block;
  padding: 8px 12px;
  margin-right: 4px;
  border: 1px solid transparent;
  border-bottom: none;
  color: #337ab7;
  position: relative;
  top: 1px;
}

.tab-link:hover {
  text-decoration: none;
  border-color: #eeeeee #eeeeee #dddddd;
  background: #eeeeee;
}

.tab-link.active {
  color: #555555;
  cursor: default;
  background: #ffffff;
  border-color: #dddddd #dddddd #ffffff;
}

/* ---------------------------------------------------------------------- */
/* Layout - main + sidebar                                                */
/* ---------------------------------------------------------------------- */

#layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

#main-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;   /* don't let a wide table stretch the flex item past its box */
}

#sidebar {
  flex: 0 0 280px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

@media (max-width: 900px) {
  #layout {
    flex-direction: column;
  }

  #sidebar {
    flex: 1 1 auto;
    width: 100%;
  }

  /* On narrow screens the sidebar leaderboard is hidden in favor of the
     dedicated Leaderboard tab, per spec ("Leaderboard-on-mobile" tab).
     The tab's own .tab-pane / .tab-pane.active rules already control
     whether that tab's content is visible - no extra override needed. */
  #sidebar {
    display: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Forms / inputs                                                         */
/* ---------------------------------------------------------------------- */

label {
  display: inline-block;
  margin-right: 6px;
  font-weight: bold;
}

input[type="email"],
input[type="text"] {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid #cccccc;
  border-radius: 2px;
  margin-right: 8px;
  margin-bottom: 8px;
  width: 240px;
  max-width: 100%;
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #66afe9;
}

/* ---------------------------------------------------------------------- */
/* Buttons - flat Bootstrap-3 blue                                        */
/* ---------------------------------------------------------------------- */

button,
.btn {
  font-family: inherit;
  font-size: 14px;
  color: #ffffff;
  background-color: #337ab7;
  border: 1px solid #2e6da4;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  margin-bottom: 8px;
}

button:hover,
.btn:hover {
  background-color: #286090;
  border-color: #204d74;
}

button:disabled {
  background-color: #999999;
  border-color: #888888;
  cursor: not-allowed;
}

/* Full-width blue rectangle buttons, like the old site's action buttons */
#load-picks-btn,
#save-display-name-btn {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-top: 15px;
}

/* Pick toggle buttons (FAVORITE / NONE / UNDERDOG) rendered as a segmented
   group inside each pick sheet row. */
.pick-toggle-group {
  display: inline-flex;
  gap: 0;
}

.pick-toggle-btn {
  background-color: #ffffff;
  color: #337ab7;
  border: 1px solid #cccccc;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 12px;
  margin-bottom: 0;
  margin-right: -1px;
}

.pick-toggle-btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.pick-toggle-btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  margin-right: 0;
}

.pick-toggle-btn.selected {
  background-color: #337ab7;
  color: #ffffff;
  border-color: #2e6da4;
  z-index: 1;
  position: relative;
}

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

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 15px;
}

th,
td {
  border: 1px solid #dddddd;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

thead th {
  background-color: #f5f5f5;
  font-weight: bold;
}

tbody tr:hover {
  background-color: #f9f9f9;
}

/* ---------------------------------------------------------------------- */
/* Pick sheet specific                                                    */
/* ---------------------------------------------------------------------- */

#week-switcher {
  margin-bottom: 12px;
}

#week-label {
  font-weight: bold;
  margin: 0 10px;
}

.tv-slot-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #555555;
  background: #f5f5f5;
  border: 1px solid #dddddd;
  border-radius: 3px;
  padding: 2px 5px;
}

.locked {
  color: #999999;
  background-color: #f5f5f5;
}

.locked .pick-toggle-btn {
  color: #aaaaaa;
  cursor: not-allowed;
}

.saved-flash {
  color: #3c763d;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
}

.badge-paid {
  color: #c9a400;
  font-size: 12px;
}
.badge-paid::before {
  content: "\2605";
  margin-left: 4px;
}

/* Bot indicator next to a name on the leaderboard */
.badge-bot {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.03em;
  color: #337ab7;
  background: #eef4fb;
  border: 1px solid #cfe1f3;
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-bot::before {
  content: "\1F916\00A0";
}

/* Consensus bar: flat single-color fill on light gray track */
.consensus-bar {
  position: relative;
  width: 100px;
  height: 14px;
  background: #eeeeee;
  border: 1px solid #dddddd;
  border-radius: 2px;
  overflow: hidden;
}

.consensus-bar-fill {
  height: 100%;
  background: #337ab7;
  width: 0%;
  transition: width 0.2s ease;
}

.consensus-label {
  font-size: 11px;
  color: #777777;
  margin-left: 6px;
}

/* ---------------------------------------------------------------------- */
/* Landing (signed-out): logo + How to Play                               */
/* ---------------------------------------------------------------------- */

#landing {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

#landing-logo {
  flex: 0 0 auto;
  width: 240px;
  height: auto;
}

#landing-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.howto-heading {
  border-bottom: 1px solid #dddddd;
  padding-bottom: 6px;
}

ol.howto {
  margin: 0;
  padding-left: 22px;
}

ol.howto li {
  margin-bottom: 7px;
}

#signin-box {
  background: #f9f9f9;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  padding: 15px 15px 8px 15px;
  margin-bottom: 10px;
}

#auth-message {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #31708f;
}

@media (max-width: 620px) {
  #landing {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------------------- */
/* Rules tab                                                              */
/* ---------------------------------------------------------------------- */

#rules-content h3 {
  font-size: 15px;
  font-weight: bold;
  margin: 18px 0 6px 0;
  color: #222222;
}

.rules-list li,
.payouts li {
  margin-bottom: 6px;
}

.payouts {
  list-style: none;
  padding-left: 0;
}

/* ---------------------------------------------------------------------- */
/* Bounties tab                                                           */
/* ---------------------------------------------------------------------- */

.bounty-intro {
  color: #555555;
  margin: 0 0 15px 0;
}

#winnings-section {
  margin-top: 25px;
}

/* One plain line above the board: how much is still winnable. */
.bounty-summary {
  margin: 0 0 15px 0;
  font-weight: bold;
  color: #333333;
}

/* Nothing published yet - a sentence instead of a headers-only table. */
.empty-note {
  margin: 0 0 15px 0;
  color: #777777;
  font-style: italic;
}

/* Weird Stats tab — plain list of published finds */
.weird-item {
  border: 1px solid #dddddd;
  border-left: 3px solid #cccccc;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.weird-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border: 1px solid #dddddd;
  background: #f5f5f5;
  color: #777777;
  margin-bottom: 5px;
}
.weird-tag-curio { color: #8a6d00; background: #fbf4dd; border-color: #ecdca0; }
.weird-tag-edge  { color: #31708f; background: #d9edf7; border-color: #bce8f1; }
/* published in the last 8 days — tells a returning reader what's actually new */
.weird-fresh {
  display: inline-block;
  font-size: 11px;
  font-style: italic;
  color: #3c763d;
  margin-left: 6px;
}
.weird-headline {
  font-size: 15px;
  color: #333333;
  line-height: 1.4;
}
.weird-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #999999;
}

/* Recaps tab */
.recap-archive-item {
  display: block;
  padding: 9px 4px;
  border-bottom: 1px solid #eeeeee;
}
.recap-archive-item:hover { background: #f9f9f9; text-decoration: none; }
.recap-date { color: #999999; font-size: 12px; margin-left: 6px; }
.recap-block { margin-bottom: 20px; }
.recap-heading {
  font-size: 16px;
  font-weight: bold;
  color: #222222;
  margin: 0 0 8px 0;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 4px;
}
.recap-block p { margin: 0 0 10px 0; }
.recap-table { width: 100%; margin-bottom: 12px; }
.recap-list { margin: 0 0 12px 0; padding-left: 20px; }
.recap-list li { margin-bottom: 5px; }
.recap-muted { color: #999999; font-size: 13px; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

#site-footer {
  margin-top: 30px;
  padding-top: 10px;
  border-top: 1px solid #dddddd;
  font-size: 12px;
  color: #999999;
}

/* ==========================================================================
   Reveal batch: attribute-of-the-week twist, bounty "how to win", glossary.
   Same 2012 register as the rest of the page.
   ========================================================================== */

/* ---- Attribute of the Week (twist) ---- */
.twist-attr { color: #777777; font-size: 12px; }
.twist-caption {
  margin: 6px 0 10px; font-size: 13px; font-style: italic;
  color: #31708f; background: #d9edf7; border: 1px solid #bce8f1;
  border-radius: 4px; padding: 6px 10px;
}

/* ---- Bounty "How to win" ---- */
.bounty-desc-text { color: #333333; }
.bounty-howto { color: #31708f; font-size: 13px; margin-top: 3px; }
.bounty-howto strong { color: #31708f; }

/* ---- Bounty status: what's still on the table vs already won ----
   OPEN is the loud one on purpose - the board's job is to show what's left.
   Claimed rows go gray-on-gray and step back. */
.bounty-open {
  font-weight: bold;
  color: #3c763d;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.bounty-claimed {
  font-weight: bold;
  color: #999999;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.bounty-status-detail { font-size: 12px; color: #777777; margin-top: 3px; }
.bounty-prize { white-space: nowrap; }
.bounty-prize-each { font-size: 11px; color: #999999; }
/* td, not tr: a cell background paints over the row's, so the striping has to
   live on the cells or the tbody hover rule wins. */
tr.bounty-row-claimed td { background-color: #f7f7f7; color: #777777; }
tr.bounty-row-claimed:hover td { background-color: #f2f2f2; }
tr.bounty-row-claimed .bounty-desc-text { color: #777777; }
/* a claimed bounty's rule is history, not an invitation - drop the blue too */
tr.bounty-row-claimed .bounty-howto,
tr.bounty-row-claimed .bounty-howto strong { color: #999999; }

/* ---- Attribute glossary ---- */
.glossary-blurb { color: #555555; margin-bottom: 12px; }
#glossary-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
#glossary-search {
  font: inherit; padding: 6px 9px; border: 1px solid #cccccc; border-radius: 4px;
  min-width: 240px; flex: 1 1 240px;
}
#glossary-picker-toggle { font-size: 13px; color: #555555; display: inline-flex; align-items: center; gap: 5px; }
#glossary-count { font-size: 12px; color: #999999; font-weight: bold; white-space: nowrap; }
.glossary-group { border: 1px solid #dddddd; border-radius: 4px; margin-bottom: 8px; }
.glossary-group > summary {
  cursor: pointer; padding: 8px 12px; font-weight: bold; color: #222222; background: #f5f5f5;
  display: flex; justify-content: space-between; align-items: center; list-style: none;
}
.glossary-group > summary::-webkit-details-marker { display: none; }
.glossary-group[open] > summary { border-bottom: 1px solid #dddddd; }
.g-dom { text-transform: capitalize; }
.g-dom-count { font-weight: normal; color: #999999; font-size: 12px; }
.g-item { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; }
.g-item:last-child { border-bottom: none; }
.g-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.g-label { font-weight: bold; color: #222222; }
.g-key {
  font-family: Menlo, Consolas, monospace; font-size: 12px; color: #8a6d00;
  background: #fbf4dd; border: 1px solid #f0e6c0; border-radius: 3px; padding: 1px 5px;
}
.g-bot { font-size: 11px; color: #31708f; background: #d9edf7; border-radius: 3px; padding: 1px 6px; }
.g-def { color: #555555; font-size: 13px; margin-top: 3px; }
.is-hidden { display: none !important; }

/* Contain wide tables so they scroll inside their box instead of pushing the
   whole page sideways on phones. Keeps the retro look, fixes mobile overflow. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* ---- Phone tweaks: make the pick sheet actually tappable ---- */
@media (max-width: 640px) {
  /* Drop the two least-essential pick-sheet columns so the FAVORITE/UNDERDOG
     buttons and Sure Thing fit without hunting sideways. Slot = TV window,
     Consensus = post-kickoff info you can't act on anyway. */
  #picksheet-table th:nth-child(1), #picksheet-table td:nth-child(1),   /* Slot */
  #picksheet-table th:nth-child(7), #picksheet-table td:nth-child(7) {  /* Consensus */
    display: none;
  }
  #picksheet-table th, #picksheet-table td { padding: 7px 6px; }

  /* Stack the FAVORITE / NONE / UNDERDOG buttons vertically on phones: a much
     narrower Pick column (so Game / Kickoff / Line / Sure Thing all fit) and
     bigger tap targets. Re-round the segmented group top/bottom instead of
     left/right. */
  #picksheet-table .pick-toggle-group { flex-direction: column; }
  #picksheet-table .pick-toggle-btn {
    margin-right: 0; margin-bottom: -1px;
    border-radius: 0; padding: 7px 8px; font-size: 12px;
  }
  #picksheet-table .pick-toggle-btn:first-child {
    border-top-left-radius: 4px; border-top-right-radius: 4px;
    border-bottom-left-radius: 0;
  }
  #picksheet-table .pick-toggle-btn:last-child {
    border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;
    border-top-right-radius: 0; margin-bottom: 0;
  }

  /* Bounty board on a phone: four columns cannot fit 375px without either a
     sideways swipe or snapping names in half (PATSAPUTSK / I), and the column
     that would end up off-screen is the one that says what's still open. So
     each bounty becomes a stacked block instead — same rows, same data, no
     horizontal scroll — with the status pulled up under the title. */
  #bounty-board-table thead { display: none; }
  #bounty-board-table,
  #bounty-board-table tbody { display: block; width: 100%; }
  #bounty-board-table tr {
    display: flex;
    flex-direction: column;
    border: 1px solid #dddddd;
    border-left: 3px solid #cccccc;
    padding: 9px 10px;
    margin-bottom: 10px;
  }
  #bounty-board-table td {
    display: block;
    border: none;
    padding: 0 0 5px 0;
    overflow-wrap: break-word;
  }
  #bounty-board-table td:last-child { padding-bottom: 0; }
  /* Title, then status, then prize, then the rule — DOM order stays put. */
  #bounty-board-table td:nth-child(1) { order: 1; }
  #bounty-board-table td:nth-child(4) { order: 2; }
  #bounty-board-table td:nth-child(2) { order: 3; }
  #bounty-board-table td:nth-child(3) { order: 4; }
  #bounty-board-table .bounty-prize-each { display: inline; margin-left: 4px; }
  /* Blocks shade as a whole, so the tint has to move off the cells. */
  #bounty-board-table tr.bounty-row-claimed { background-color: #f7f7f7; }
  #bounty-board-table tr.bounty-row-claimed td,
  #bounty-board-table tr.bounty-row-claimed:hover td { background-color: transparent; }

  #winnings-table th, #winnings-table td { padding: 7px 6px; }
}
