.game-detail-edit-game {
  line-height: 1;
}

.game-detail-edit-game .bi {
  font-size: 1rem;
}

.result-badge--win {
  background-color: #198754;
  color: #fff;
}

.result-badge--win-double {
  background-color: #20c997;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 0 2px #20c997;
}

.result-badge--loss {
  background-color: #dc3545;
  color: #fff;
}

.result-badge--tie {
  background-color: #c4a574;
  color: #212529;
}

.result-badge--loss-double {
  background-color: #ff6b81;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 2px #ff6b81;
}

.result-badge--shutout {
  background-color: #e8f5e9;
  border: 1px solid #81c784;
  color: #1b5e20;
  font-weight: 500;
}

.game-detail-result-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.game-detail-result-shutout-icon {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  flex-shrink: 0;
}

.result-badge-shutout-icon,
.game-list-shutout-icon {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  vertical-align: -0.15em;
}

.result-badge--shutout .result-badge-shutout-icon {
  margin-right: 0.2rem;
}

.game-list-shutout-icon {
  margin-left: 0.15rem;
}

.game-list-weight-col .game-list-shutout-icon {
  display: inline-block;
}

.game-list-row {
  cursor: pointer;
}

.game-list-table tbody td.game-list-cell--win {
  background-color: #198754 !important;
  color: #fff !important;
}

.game-list-table tbody td.game-list-cell--win-double {
  background-color: #20c997 !important;
  color: #000 !important;
  font-weight: 700;
}

.game-list-table tbody td.game-list-cell--loss {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.game-list-table tbody td.game-list-cell--loss-double {
  background-color: #ff6b81 !important;
  color: #fff !important;
  font-weight: 700;
}

.game-list-table tbody td.game-list-cell--tie {
  background-color: #c4a574 !important;
  color: #212529 !important;
}

.game-list-table tbody tr:hover td.game-list-cell--win {
  background-color: #157347 !important;
  color: #fff !important;
}

.game-list-table tbody tr:hover td.game-list-cell--win-double {
  background-color: #1aa179 !important;
  color: #000 !important;
}

.game-list-table tbody tr:hover td.game-list-cell--loss {
  background-color: #bb2d3b !important;
  color: #fff !important;
}

.game-list-table tbody tr:hover td.game-list-cell--loss-double {
  background-color: #e85a6f !important;
  color: #fff !important;
}

.game-list-table tbody tr:hover td.game-list-cell--tie {
  background-color: #b59563 !important;
  color: #212529 !important;
}

.game-list-stats-table th[scope="row"] {
  white-space: nowrap;
  font-weight: 600;
}

.game-list-stats-table .game-list-stats-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--bs-table-bg);
  box-shadow: 1px 0 0 var(--bs-border-color);
}

.game-list-stats-table thead .game-list-stats-sticky-col {
  z-index: 3;
}

.game-list-stats-table .game-list-stats-game-icon-col {
  text-align: center;
  vertical-align: middle;
  width: 1%;
}

.game-list-stats-game-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 auto;
  object-fit: contain;
}

.player-type-icon {
  opacity: 0.75;
  margin-right: 0.25rem;
}

.game-list-table thead th,
.game-list-table-foot th,
.game-list-stats-table thead th {
  vertical-align: middle;
}

.game-list-player-col-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  max-width: 100%;
}

.game-list-player-col-header .player-type-icon {
  margin-right: 0;
  flex-shrink: 0;
}

.game-list-player-col-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  min-width: 0;
}

.game-list-player-col-label-line {
  display: block;
}

.game-list-stats-table .game-list-stats-col--all {
  background-color: #e9ecef;
}

.game-list-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
}

.game-detail-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.game-detail-title-icon {
  display: block;
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  object-fit: contain;
}

.game-list-title-icon {
  display: block;
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  margin: 1px 0;
  padding: 0;
  object-fit: contain;
}

.game-list-title-select-wrap {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 0.1rem;
}

.game-list-title-select {
  width: auto;
  flex-shrink: 0;
  max-width: calc(100% - 1.5rem);
  font-size: calc(1.275rem + 0.3vw);
  font-weight: 500;
  line-height: 1.2;
  color: var(--bs-heading-color, inherit);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  background-color: transparent;
  background-image: none;
  padding: 0;
  cursor: pointer;
  overflow: visible;
}

.game-list-title-chevron {
  font-size: 0.75em;
  line-height: 1;
  pointer-events: none;
  flex-shrink: 0;
  margin-left: 0.1rem;
}

.game-list-title-select:focus {
  border-color: transparent;
  box-shadow: none;
}

.game-list-stats-table td.game-list-stats-cell--best {
  background-color: #198754 !important;
  color: #fff !important;
}

.game-list-stats-table td.game-list-stats-cell--worst {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.game-list-stats-table td.game-list-stats-cell--tie {
  background-color: #c4a574 !important;
  color: #212529 !important;
}

.game-list-filters-header {
  padding: 0.5rem 1rem;
}

.game-list-filters-toggle {
  gap: 0.25rem 0.5rem;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
}

.game-list-filters-summary {
  text-align: start;
}

.dashboard-section-header {
  padding: 0.375rem 0.75rem;
}

.dashboard-section-header .game-list-filters-toggle {
  gap: 0.125rem 0.375rem;
  align-items: center;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.dashboard-section-icon {
  flex-shrink: 0;
  opacity: 0.85;
  margin: 1px 0;
  padding: 0;
}

.dashboard-section-icon.bi {
  font-size: 1.625rem;
  line-height: 1;
}

.dashboard-section-icon--image {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.game-list-table-foot th {
  border-top-width: 2px;
  background-color: var(--bs-table-bg);
  position: sticky;
  bottom: 0;
  z-index: 1;
  box-shadow: 0 -1px 0 var(--bs-border-color);
}

/* Game list layout density tiers */
.game-list tbody .game-list-player-col,
.game-list .game-list-nowrap-col {
  white-space: nowrap;
}

.game-list thead .game-list-player-col,
.game-list tfoot .game-list-player-col,
.game-list-stats-table thead .game-list-player-col {
  white-space: normal;
}

.game-list .game-list-player-col {
  width: 1%;
}

.game-list .game-list-weight-col {
  width: 1%;
}

.game-list .game-list-location-col {
  box-sizing: border-box;
  width: 11rem;
  min-width: 10rem;
  max-width: 11rem;
  vertical-align: middle;
}

/* Pin sits beside the name block (not inside line-clamp), so it cannot
   wrap onto its own line. Name clamps to 2 layout lines. */
.game-list-location {
  display: flex;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-width: 9.75rem;
  max-width: 11rem;
}

.game-list-location-pin {
  flex: 0 0 auto;
  margin-top: 0.15em;
  margin-right: 0.25rem;
  font-size: 0.85em;
  line-height: 1;
  color: var(--bs-success, #198754);
}

.game-list-location-name {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Few player columns (comfortable): give location more room on desktop. */
@media (min-width: 768px) {
  .game-list-density--comfortable .game-list-location-col {
    width: 16rem;
    min-width: 14rem;
    max-width: 18rem;
  }

  .game-list-density--comfortable .game-list-location {
    min-width: 13.75rem;
    max-width: 18rem;
  }
}

.game-list-density--comfortable .game-list-table-card,
.game-list-density--comfortable .game-list-stats-card,
.game-list-density--compact .game-list-table-card,
.game-list-density--compact .game-list-stats-card {
  width: fit-content;
  max-width: 100%;
}

.game-list-density--comfortable .game-list-data-table,
.game-list-density--compact .game-list-data-table {
  width: auto;
}

.game-list-density--dense .game-list-table-card,
.game-list-density--dense .game-list-stats-card {
  width: 100%;
}

.game-list-density--dense .game-list-data-table {
  width: 100%;
}

/* Compact tier */
.game-list-density--compact {
  font-size: 0.8125rem;
  line-height: 1.25;
}

.game-list-density--compact .game-list-filters-card {
  margin-bottom: 0.75rem !important;
}

.game-list-density--compact .game-list-filters-body {
  padding: 0.5rem 0.75rem;
}

.game-list-density--compact #game-list-filters .form-select,
.game-list-density--compact #game-list-filters .form-control {
  font-size: 0.8125rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.game-list-density--compact #game-list-filters {
  --bs-gutter-y: 0.5rem;
}

.game-list-density--compact .game-list-filters-header {
  padding: 0.35rem 0.75rem;
}

.game-list-density--compact .game-list-stats-header {
  padding: 0.35rem 0.75rem;
}

.game-list-density--compact .game-list-stats-body {
  padding: 0.5rem;
}

.game-list-density--compact .game-list-data-table > :not(caption) > * > * {
  padding: 0.2rem 0.35rem;
}

.game-list-density--compact .game-list-pagination {
  margin-top: 0.75rem !important;
}

.game-list-density--compact .pagination {
  --bs-pagination-padding-x: 0.5rem;
  --bs-pagination-padding-y: 0.2rem;
  --bs-pagination-font-size: 0.8125rem;
}

.game-list-density--compact .game-list-weight-badge {
  font-size: 0.65em;
  padding: 0.15em 0.4em;
}

/* Dense tier */
.game-list-density--dense {
  font-size: 0.6875rem;
  line-height: 1.15;
}

.game-list-density--dense .game-list-filters-card {
  margin-bottom: 0.5rem !important;
}

.game-list-density--dense .game-list-filters-body {
  padding: 0.25rem 0.5rem;
}

.game-list-density--dense .form-label {
  margin-bottom: 0;
  font-size: inherit;
}

.game-list-density--dense #game-list-filters .form-select {
  font-size: 0.6875rem;
  min-height: 1.5rem;
  padding: 0.1rem 1.5rem 0.1rem 0.3rem;
}

.game-list-density--dense #game-list-filters .form-control {
  font-size: 0.6875rem;
  min-height: 1.5rem;
  padding: 0.1rem 0.3rem;
}

.game-list-density--dense #game-list-filters {
  --bs-gutter-y: 0.25rem;
}

.game-list-density--dense .game-list-filters-header {
  padding: 0 0.5rem;
}

.game-list-density--dense .game-list-stats-header {
  padding: 0 0.5rem;
  font-size: inherit;
}

.game-list-density--dense .game-list-stats-body {
  padding: 0.25rem;
}

.game-list-density--dense .game-list-data-table > :not(caption) > * > * {
  padding: 0.1rem 0.25rem;
}

.game-list-density--dense .game-list-stats-table > :not(caption) > * > * {
  padding: 0.08rem 0.2rem;
}

.game-list-density--dense .game-list-pagination {
  margin-top: 0.5rem !important;
}

.game-list-density--dense .pagination {
  --bs-pagination-padding-x: 0.4rem;
  --bs-pagination-padding-y: 0.1rem;
  --bs-pagination-font-size: 0.6875rem;
}

.game-list-density--dense .game-list-weight-badge {
  font-size: 0.6em;
  padding: 0.1em 0.35em;
  vertical-align: middle;
}

.game-list-density--dense .game-list-data-table {
  font-size: inherit;
}

.game-list-density--compact .game-list-data-table,
.game-list-density--dense .game-list-data-table {
  font-size: inherit;
}

.game-list-density--compact .game-list-data-table.table-hover,
.game-list-density--dense .game-list-data-table {
  --bs-table-cell-padding-y: 0.2rem;
  --bs-table-cell-padding-x: 0.35rem;
}

.matchup-table-wrap {
  overflow: auto;
  max-width: 100%;
}

.matchup-table .matchup-player-col {
  min-width: 7rem;
  vertical-align: middle;
}

.matchup-table .matchup-sticky-label-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 6.5rem;
  max-width: 7.5rem;
  background-color: var(--bs-table-bg);
  box-shadow: 1px 0 0 var(--bs-border-color);
  white-space: normal;
  vertical-align: middle;
}

.matchup-table tbody th.matchup-sticky-label-col {
  font-family:
    "Arial Narrow", "Helvetica Neue Condensed", "Liberation Sans Narrow",
    sans-serif;
  font-stretch: condensed;
  font-variation-settings: "wdth" 75;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.matchup-table thead th.matchup-sticky-label-col,
.matchup-table thead th.matchup-player-col {
  font-size: 0.8125rem;
  font-weight: 600;
}

.matchup-table thead .matchup-sticky-label-col {
  z-index: 3;
}

.matchup-cell--up,
.matchup-player-col--up {
  background-color: rgba(25, 135, 84, 0.14) !important;
}

.matchup-cell--down,
.matchup-player-col--down {
  background-color: rgba(220, 53, 69, 0.12) !important;
}

.matchup-cell--overtook,
.matchup-player-col--up.matchup-player-col--up {
  box-shadow: inset 0 0 0 2px rgba(25, 135, 84, 0.55);
}

.matchup-cell--overtook {
  background-color: rgba(25, 135, 84, 0.22) !important;
}

.matchup-cell--overtaken,
.matchup-player-col--down.matchup-player-col--down {
  box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 0.45);
}

.matchup-cell--overtaken {
  background-color: rgba(220, 53, 69, 0.18) !important;
}

.matchup-change-icon {
  font-size: 1.1rem;
  line-height: 1;
  vertical-align: middle;
}

.matchup-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 0.5rem;
  row-gap: 0.5rem;
}

.game-record-score-input {
  min-width: 3rem;
  max-width: 6rem;
}

.game-record-table .game-record-col--score,
.game-record-table .game-record-col--result {
  width: 1%;
  white-space: nowrap;
}

.game-record-table .participant-label {
  width: 100%;
}

.game-edit-player-row--removed label {
  text-decoration: line-through;
  opacity: 0.5;
}

.game-edit-player-row--removed .game-edit-score-input {
  opacity: 0.35;
}
