/* Prizes "By Year" page (prizes_view#index) -- ported from legacy's prizes_index_modern.css. This page is a
   stack of ~10 different prize-category sections (Season, Segment, Majors, FedEx, Commissioner's Cup, several
   ITM contests, Skins Pool, Weekly Tournament), each rendered by its own partial but sharing the exact same
   .prizesXxx/.prizesHeader/.prizesNote/.prizeRow1/.prizeRow2 markup -- only the color varies per category
   (already color-coded in legacy, e.g. Season=navy, Segment=baby blue, Skins=black). */

.prizesIndexPage .prizesControls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.prizesIndexPage .prizesYearPicker {
  width: fit-content;
}

.prizesIndexPage .prizesYearPicker .input-group-text {
  font-weight: 700;
  font-size: 13px;
  color: #333;
}

.prizesIndexPage .prizesYearPicker select {
  width: 70px;
  flex: 0 0 auto;
}

.prizesIndexPage #prizesTotalPrizeMoney {
  display: inline-flex;
  align-items: center;
  padding: 4px 13px;
  background: var(--ptfg-bg-hover);
  border: 1px solid #cfd8ee;
  border-radius: 999px;
  color: var(--ptfg-navy);
  font-size: 12px;
  font-weight: 700;
}

.prizesIndexPage .prizesDistributedBadge {
  display: inline-block;
  padding: 4px 13px;
  background: var(--ptfg-bg-green-tint);
  border: 1px solid #b9e3c2;
  color: var(--ptfg-green);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.prizesIndexPage .prizes {
  width: auto;
  max-width: 700px;
}

.prizesIndexPage .prizesTiebreakerNote {
  max-width: 700px;
}

/* width: 100% (of the shared .prizes container below, capped at 800px) rather than fit-content -- every
   section's card should read as one consistent-width list, not size itself independently to whichever
   section happens to have the longest team/owner name that week. */
.prizesIndexPage .prizesSectionBottomSpacer {
  display: block;
  width: 100%;
  margin-bottom: 20px;
  border: 1px solid var(--ptfg-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(11, 26, 103, 0.06);
  background: #fff;
}

.prizesIndexPage .prizesSectionBottomSpacer:last-child {
  margin-bottom: 0;
}

.prizesIndexPage .prizesSectionBottomSpacer table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
}

/* Fixed, shared column widths so Place/Prize/%/Flag/Owner line up vertically across every card -- without
   table-layout: fixed, each table sizes its own columns independently based on that section's own longest
   Owner/Team name, so the same column reads at a different x-position from one card to the next. Skins Pool
   is deliberately excluded: its Week + Tournament columns replace the single Place column the rest share, so
   it was never going to line up with these regardless of width rules. */
.prizesIndexPage .prizesSectionBottomSpacer:not(.prizesSkins) table {
  table-layout: fixed;
}

.prizesIndexPage .prizesSectionBottomSpacer:not(.prizesSkins) td.prizesNarrowCol {
  width: 44px;
}

.prizesIndexPage .prizesSectionBottomSpacer:not(.prizesSkins) td.number {
  width: 80px;
}

/* Owner/Team/[Country Club] are always the last three columns in that order (Country Club only when
   DISPLAY_COUNTRY_CLUB is on) -- Team capped around 30 characters per request, Country Club (when present)
   is the one flexible column left to absorb whatever width remains. */
.prizesIndexPage .prizesSectionBottomSpacer:not(.prizesSkins) td:nth-last-child(3) {
  width: 140px;
}

.prizesIndexPage .prizesSectionBottomSpacer:not(.prizesSkins) td:nth-last-child(2) {
  width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prizesIndexPage .prizesHeader {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.prizesIndexPage .pickWinnerBadge {
  display: inline-block;
  padding: 2px 10px;
  background: #fff3cd;
  border: 1px solid #f0d896;
  color: #7a5c00;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.prizesIndexPage .inProgressText {
  display: inline-block;
  padding: 2px 10px;
  background: #fff;
  color: var(--ptfg-red);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.prizesIndexPage .statusPill {
  display: inline-block;
  padding: 2px 10px;
  background: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
}

.prizesIndexPage .statusPillInProgress {
  border: 1px solid #f5c2c0;
  color: var(--ptfg-red);
}

.prizesIndexPage .statusPillInProgress:hover {
  background: var(--ptfg-bg-red-tint);
  color: var(--ptfg-red);
  text-decoration: none;
}

.prizesIndexPage .statusPillComplete {
  border: 1px solid #b8dfc0;
  color: var(--ptfg-green);
}

.prizesIndexPage .statusPillComplete:hover {
  background: #e8f5ea;
  color: var(--ptfg-green);
  text-decoration: none;
}

/* Per-category header colors -- preserved from legacy's own .prizesXxx .prizesHeader rules. */
.prizesIndexPage .prizesSeason .prizesHeader {
  color: #fff;
  background: var(--ptfg-navy);
}

.prizesIndexPage .prizesSegment .prizesHeader {
  color: var(--ptfg-navy);
  background: #bbd9ee;
}

.prizesIndexPage .prizesSkins .prizesHeader {
  color: #fff;
  background: #1a1a1a;
}

.prizesIndexPage .prizesInTheMoneySingle .prizesHeader {
  color: #fff;
  background: #610050;
}

.prizesIndexPage .prizesInTheMoneyMulti .prizesHeader {
  color: #fff;
  background: #3366ff;
}

.prizesIndexPage .prizesMajorsOnly .prizesHeader {
  color: #fff;
  background: #fd6b00;
}

.prizesIndexPage .prizesPgaPlayoffs .prizesHeader {
  color: #4a3a06;
  background: #daa520;
}

.prizesIndexPage .prizesCommissionersCup .prizesHeader {
  color: #5c4a10;
  background: #eee7bd;
}

.prizesIndexPage .prizesTournament .prizesHeader {
  color: #fff;
  background: var(--ptfg-green);
}

/* Column-label row (the table's own <thead>) -- neutral/light since the bold color lives on .prizesHeader
   above it. */
.prizesIndexPage .prizes thead td {
  background: var(--ptfg-bg-card-tint);
  color: #333;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--ptfg-border);
  white-space: nowrap;
}

.prizesIndexPage .prizes tr {
  border: none;
}

.prizesIndexPage .prizes td {
  padding: 2px 6px;
  font-size: 12px;
  border-bottom: 1px solid #eef0f6;
  white-space: nowrap;
}

.prizesIndexPage .prizes td.number {
  text-align: right;
}

.prizesIndexPage .prizes td.centerText {
  text-align: center;
}

.prizesIndexPage .userFlagImage {
  display: block;
  max-height: 16px;
  margin: 0 auto;
}

/* Shared narrow-column treatment for Place/%/Flag -- short, fixed-shape content that otherwise stretches to
   fit its own uppercase/letter-spaced header text (PLACE, %, FLAG) rather than its actual content. Not
   page-scoped: also used on career_winnings.html.erb/season_summary.html.erb (#standingsTable, not .prizes).
   Tight padding (rather than just width: 1%) is what actually gets these down close to their content's real
   width, since the header cell's own text is otherwise still the widest thing in the column. The three-
   class/type selectors below match (or exceed) the specificity of .prizesIndexPage .prizes thead/tbody td's
   own padding rules above, so this reliably wins regardless of source order -- a bare .prizesNarrowCol alone
   would lose that fight. */
.prizesNarrowCol {
  width: 1%;
  white-space: nowrap;
}

.prizesIndexPage .prizes thead td.prizesNarrowCol,
.prizesIndexPage .prizes td.prizesNarrowCol,
#standingsTable td.prizesNarrowCol {
  padding-left: 2px;
  padding-right: 2px;
}

.prizesIndexPage tbody tr.prizeRow1 td {
  background-color: var(--ptfg-bg-row-shade);
}

.prizesIndexPage tbody tr.prizeRow2 td {
  background-color: #fff;
}

.prizesIndexPage tbody tr:hover td {
  background-color: var(--ptfg-bg-hover);
}

.prizesIndexPage tbody tr.highlightRow td {
  background-color: var(--ptfg-highlight);
}

.prizesIndexPage .prizeDescription {
  color: #333;
}

.prizesIndexPage .prizesNote {
  padding: 8px 16px;
  font-size: 11px;
  color: var(--ptfg-text-muted);
  background: var(--ptfg-bg-tint);
}

.prizesIndexPage .prizesNote a {
  color: var(--ptfg-navy);
  font-weight: 600;
  text-decoration: none;
}

.prizesIndexPage .prizesNote a:hover {
  text-decoration: underline;
}

.prizesIndexPage .prizesSkins tbody td:first-child a {
  font-weight: 700;
  color: var(--ptfg-navy);
}
