/* NHL Starting Goalies ([nhl_starting_goalies], rb-nhl-goalies.php).
   Forked from the NBA lineups page (nba_lineups.css): full content width, two games per row
   (one under 1100px), both teams' cards side by side — each card holds one goalie. Phones
   keep one game per row in a compact card. */

.rb-nhlg-host {
  --nhlg-surface: #ffffff;
  --nhlg-fg: #0f172a;
  --nhlg-muted: #64748b;
  --nhlg-line: #e2e8f0;
  --nhlg-soft: #f1f5f9;
  --nhlg-brand: #004d99;
  --nhlg-brand-soft: #eaf2fb;
  --nhlg-ok: #15803d;
  --nhlg-ok-soft: #e8f6ec;
  --nhlg-proj: #92400e;
  --nhlg-proj-soft: #fff7e6;
  --nhlg-bad: #b91c1c;
  --nhlg-bad-soft: #fdeeee;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--nhlg-fg);
  font-size: 15px;
  line-height: 1.45;
}

/* The theme sizes every div by id (`#main-container div { font-size: 20px; line-height:
   30px }`, `body #main-container div { font-size: 19px }`) and, on mobile, gives it
   `margin: 0 auto 0 1px` (`.entry div`), which shrinks flex/grid items to their content.
   Divs here inherit size and take no margin; the few divs with their own size or margin
   use the same `body #main-container` prefix. */
body #main-container .rb-nhlg-host div {
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

body #main-container .rb-nhlg-host .rb-nhlg-foot {
  margin-top: auto;
}

.rb-nhlg-host *,
.rb-nhlg-host *::before,
.rb-nhlg-host *::after {
  box-sizing: border-box;
}

.rb-nhlg {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

/* Toolbar */
.rb-nhlg-bar {
  align-items: center;
  background: var(--nhlg-surface);
  border: 1px solid var(--nhlg-line);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
}

.rb-nhlg-date {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 8px;
}

.rb-nhlg-host button {
  background: var(--nhlg-surface);
  border: 1px solid var(--nhlg-line);
  border-radius: 8px;
  color: var(--nhlg-fg);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  margin: 0;
  padding: 6px 10px;
  text-transform: none;
}

.rb-nhlg-date button {
  font-size: 17px;
  line-height: 1;
  padding: 5px 10px;
}

.rb-nhlg-host button:disabled {
  cursor: default;
  opacity: 0.35;
}

.rb-nhlg-host button.is-on {
  background: var(--nhlg-brand);
  border-color: var(--nhlg-brand);
  color: #ffffff;
}

.rb-nhlg-host button:focus-visible,
.rb-nhlg-host a:focus-visible {
  outline: 2px solid var(--nhlg-brand);
  outline-offset: 2px;
}

.rb-nhlg-spacer {
  flex: 1;
}

.rb-nhlg-count {
  color: var(--nhlg-muted);
  font-size: 13px;
}

.rb-nhlg-count b {
  color: var(--nhlg-fg);
}

.rb-nhlg-empty {
  background: var(--nhlg-surface);
  border: 1px dashed var(--nhlg-line);
  border-radius: 10px;
  color: var(--nhlg-muted);
  padding: 24px 16px;
  text-align: center;
}

.rb-nhlg.is-loading .rb-nhlg-games {
  opacity: 0.55;
}

/* Game */
/* Two games per row on wide screens, one below 1100px. */
.rb-nhlg-games {
  align-items: start;
  display: grid;
  gap: 28px 48px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .rb-nhlg-games {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rb-nhlg-games > .rb-nhlg-empty {
  grid-column: 1 / -1;
}

.rb-nhlg-game {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rb-nhlg-ghead {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 0 2px;
}

.rb-nhlg-matchup {
  font-size: 17px;
  font-weight: 800;
}

.rb-nhlg-tip {
  color: var(--nhlg-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rb-nhlg-pair {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}


/* Card */
.rb-nhlg-card {
  background: var(--nhlg-surface);
  border: 1px solid var(--nhlg-line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.rb-nhlg-chead {
  align-items: center;
  border-bottom: 1px solid var(--nhlg-line);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}

/* The theme's mobile sheet sets `.entry div img { width: 100% }` and `.entry img` padding;
   this selector outranks both so logos stay logo-sized. */
.rb-nhlg-host .rb-nhlg-card img.rb-nhlg-logo {
  flex: none;
  height: 34px;
  margin: 0;
  max-width: none;
  object-fit: contain;
  padding: 0;
  width: 34px;
}

.rb-nhlg-tname {
  font-weight: 700;
  min-width: 0;
}

body #main-container .rb-nhlg-host .rb-nhlg-tname {
  line-height: 1.15;
}

.rb-nhlg-tname small {
  color: var(--nhlg-muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
}

/* Small pill pinned to the card's top-right corner. */
.rb-nhlg-status {
  align-self: flex-start;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  margin-left: auto;
  padding: 1px 7px;
  white-space: nowrap;
}

.rb-nhlg-status.is-confirmed {
  background: var(--nhlg-ok-soft);
  color: var(--nhlg-ok);
}

.rb-nhlg-status.is-projected,
.rb-nhlg-status.is-none {
  background: var(--nhlg-proj-soft);
  color: var(--nhlg-proj);
}

.rb-nhlg-status.is-changed {
  background: var(--nhlg-bad-soft);
  color: var(--nhlg-bad);
}

.rb-nhlg-rows {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

/* The theme gives content lists bottom margins and bullets; none inside a card. */
body #main-container .rb-nhlg-host ul.rb-nhlg-rows {
  list-style: none;
  margin: 0;
}

body #main-container .rb-nhlg-host ul.rb-nhlg-rows li {
  list-style: none;
  margin: 0;
}

.rb-nhlg-rows li {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 36px 34px minmax(0, 1fr) auto;
  margin: 0;
  padding: 7px 12px;
}

.rb-nhlg-rows li {
  min-height: 44px;
}

body #main-container .rb-nhlg-host .rb-nhlg-rows .rb-nhlg-name {
  font-size: 16px;
}

.rb-nhlg-rows li + li {
  border-top: 1px solid var(--nhlg-soft);
}

.rb-nhlg-pos {
  background: var(--nhlg-brand-soft);
  border-radius: 4px;
  color: var(--nhlg-brand);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0;
  text-align: center;
}

.rb-nhlg-num {
  color: var(--nhlg-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rb-nhlg-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rb-nhlg-name a {
  color: inherit;
  text-decoration: none;
}

.rb-nhlg-name a:hover {
  color: var(--nhlg-brand);
  text-decoration: underline;
}

.rb-nhlg-flag {
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Pills size to their text. The theme's mobile sheet gives inline text a 30px line
   height, which made the Scratched / In boxes nearly row-tall. */
body #main-container .rb-nhlg-host .rb-nhlg-flag,
body #main-container .rb-nhlg-host .rb-nhlg-status {
  line-height: 1.4;
}

.rb-nhlg-short {
  display: none;
}

.rb-nhlg-flag.is-out {
  background: var(--nhlg-bad-soft);
  color: var(--nhlg-bad);
}

.rb-nhlg-flag.is-q {
  background: var(--nhlg-proj-soft);
  color: var(--nhlg-proj);
}

.rb-nhlg-flag.is-in {
  background: var(--nhlg-ok-soft);
  color: var(--nhlg-ok);
}

.rb-nhlg-rows li.is-scratched .rb-nhlg-name {
  color: var(--nhlg-muted);
  font-weight: 500;
  text-decoration: line-through;
}

.rb-nhlg-wait {
  color: var(--nhlg-muted);
  padding: 18px 12px;
}

body #main-container .rb-nhlg-host .rb-nhlg-wait {
  font-size: 14px;
}

body #main-container .rb-nhlg-host .rb-nhlg-foot {
  font-size: 12px;
}

.rb-nhlg-foot {
  background: var(--nhlg-soft);
  border-top: 1px solid var(--nhlg-line);
  color: var(--nhlg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: auto;
  padding: 8px 12px;
}

/* Footer notes: one line on desktop ("Updated 7:07 PM ET by @cavs · First posted 6:37 PM
   ET"); a tight bulleted list on phones. Id-prefixed: the theme styles content lists. */
body #main-container .rb-nhlg-host ul.rb-nhlg-foot {
  list-style: none;
  margin: auto 0 0;
}

body #main-container .rb-nhlg-host ul.rb-nhlg-foot li {
  line-height: 1.35;
  list-style: none;
  margin: 0;
  padding: 0;
}

body #main-container .rb-nhlg-host ul.rb-nhlg-foot li + li::before {
  content: "· ";
}

.rb-nhlg-foot a {
  color: var(--nhlg-brand);
  font-weight: 600;
  text-decoration: none;
}

.rb-nhlg-card.is-flash {
  animation: rb-nhlg-flash 1.6s ease-out;
}

@keyframes rb-nhlg-flash {
  from {
    background: #fef3c7;
  }
  to {
    background: var(--nhlg-surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rb-nhlg-card.is-flash {
    animation: none;
  }
}

/* ── Phones: one game per row, both teams side by side in a compact card ── */
@media (max-width: 720px) {
  .rb-nhlg-host {
    font-size: 14px;
  }

  .rb-nhlg,
  .rb-nhlg-games {
    gap: 20px;
  }

  .rb-nhlg-bar {
    gap: 8px;
    padding: 8px;
  }

  .rb-nhlg-date {
    justify-content: space-between;
    width: 100%;
  }

  .rb-nhlg-date button {
    padding: 7px 14px;
  }

  .rb-nhlg-bar > button {
    flex: 1;
    padding: 8px 6px;
  }

  .rb-nhlg-spacer {
    display: none;
  }

  .rb-nhlg-count {
    font-size: 12px;
    width: 100%;
  }

  .rb-nhlg-matchup {
    font-size: 15px;
  }

  .rb-nhlg-tip {
    font-size: 12px;
  }

  .rb-nhlg-pair {
    gap: 8px;
  }

  /* Logo + short name, status pill in the top-right corner. */
  .rb-nhlg-chead {
    gap: 6px;
    padding: 7px 8px;
  }

  .rb-nhlg-host .rb-nhlg-card img.rb-nhlg-logo {
    height: 24px;
    width: 24px;
  }

  /* Team name stays on one line ("Mavericks", "Trail Blazers"); short status label. */
  .rb-nhlg-tname {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rb-nhlg-long {
    display: none;
  }

  .rb-nhlg-short {
    display: inline;
  }

  body #main-container .rb-nhlg-host .rb-nhlg-tname {
    font-size: 13px;
  }

  .rb-nhlg-tname small {
    font-size: 11px;
  }

  .rb-nhlg-status {
    font-size: 10px;
    padding: 1px 6px;
  }

  .rb-nhlg-rows {
    padding: 2px 0;
  }

  /* Row: position | name (jersey before it); an injury/change flag drops under the name. */
  .rb-nhlg-rows li {
    gap: 1px 6px;
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 4px 8px;
  }

  .rb-nhlg-pos {
    align-self: start;
    border-radius: 3px;
    font-size: 9.5px;
    line-height: 1.5;
    padding: 0;
  }

  .rb-nhlg-num {
    display: none;
  }

  .rb-nhlg-name {
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .rb-nhlg-flag {
    font-size: 10px;
    grid-column: 2;
    justify-self: start;
    padding: 1px 5px;
  }

  .rb-nhlg-rows li > span:empty {
    display: none;
  }

  .rb-nhlg-wait {
    padding: 12px 8px;
  }

  body #main-container .rb-nhlg-host .rb-nhlg-wait {
    font-size: 12px;
  }

  .rb-nhlg-foot {
    display: block;
    padding: 5px 8px;
  }

  body #main-container .rb-nhlg-host ul.rb-nhlg-foot li {
    line-height: 1.3;
    padding-left: 9px;
    position: relative;
  }

  body #main-container .rb-nhlg-host ul.rb-nhlg-foot li::before,
  body #main-container .rb-nhlg-host ul.rb-nhlg-foot li + li::before {
    content: "•";
    left: 0;
    position: absolute;
  }

  body #main-container .rb-nhlg-host .rb-nhlg-foot {
    font-size: 11px;
  }
}
