/* RosterGrid main workspace — single spreadsheet grid */

.roster-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 16rem;
  color: rgb(100 116 139);
  text-align: center;
  padding: 2rem;
}

.roster-empty.hidden,
#empty-state.hidden,
#roster-view.hidden,
.modal-backdrop.hidden {
  display: none !important;
}

.roster-main-toolbar {
  background: white;
  border-bottom: 1px solid rgb(226 232 240);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
  z-index: 5;
}

.roster-main-toolbar-top,
.roster-main-toolbar-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.roster-main-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgb(15 23 42);
  line-height: 1.2;
}

.roster-main-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: rgb(100 116 139);
}

.roster-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.roster-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgb(241 245 249);
  color: rgb(51 65 85);
  border: 1px solid rgb(226 232 240);
}

.roster-stat-chip strong {
  font-variant-numeric: tabular-nums;
}

.roster-stat-chip.is-warn {
  background: rgb(255 247 237);
  border-color: rgb(254 215 170);
  color: rgb(154 52 18);
}

.roster-stat-chip.is-danger {
  background: rgb(254 242 242);
  border-color: rgb(254 202 202);
  color: rgb(153 27 27);
}

.roster-player-search-wrap {
  width: min(18rem, 100%);
  margin-bottom: 0;
}

.roster-toolbar-actions {
  display: flex;
  gap: 0.4rem;
}

.roster-action-btn {
  border: 1px solid rgb(226 232 240);
  background: white;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(51 65 85);
}

.roster-action-btn:hover {
  background: rgb(248 250 252);
}

.roster-action-btn.is-primary {
  background: rgb(37 99 235);
  border-color: rgb(37 99 235);
  color: white;
}

.roster-action-btn.is-primary:hover {
  background: rgb(29 78 216);
}

.roster-coaches-panel {
  flex-shrink: 0;
  background: rgb(248 250 252);
  border-bottom: 1px solid rgb(226 232 240);
  padding: 0.55rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  max-height: 5.5rem;
  overflow: auto;
}

.roster-coaches-panel:empty {
  display: none;
}

.roster-coaches-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(148 163 184);
}

.roster-coach-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
  background: white;
  border: 1px solid rgb(226 232 240);
  font-size: 0.75rem;
}

.roster-coach-chip input {
  border: 0;
  background: transparent;
  min-width: 0;
  padding: 0;
  font-size: 0.75rem;
}

.roster-coach-chip input[data-coach-field='name'] {
  font-weight: 600;
  width: 7rem;
  color: rgb(15 23 42);
}

.roster-coach-chip input[data-coach-field='email'] {
  width: 9rem;
  color: rgb(100 116 139);
}

.roster-coach-chip .coach-team {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(37 99 235);
  background: rgb(239 246 255);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.roster-coach-empty {
  font-size: 0.75rem;
  color: rgb(148 163 184);
}

.roster-grid-shell {
  display: flex;
  flex-direction: column;
  background: var(--workspace-bg, #f4f6f8);
  padding: 0.75rem;
}

.roster-no-teams {
  margin: auto;
  max-width: 24rem;
  padding: 1.5rem;
  text-align: center;
  color: rgb(100 116 139);
  font-size: 0.875rem;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.85rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.04);
}

.roster-grid-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.04);
  overflow: hidden;
}

.roster-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: white;
}

.roster-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.roster-table th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: rgb(248 250 252);
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgb(226 232 240);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(100 116 139);
  white-space: nowrap;
}

.roster-table th.is-sticky,
.roster-table td.is-sticky,
.roster-table th.is-sticky-2,
.roster-table td.is-sticky-2 {
  position: sticky;
  background: white;
}

.roster-table th.is-sticky,
.roster-table td.is-sticky {
  left: 0;
  z-index: 3;
}

.roster-table th.is-sticky {
  z-index: 8;
  background: rgb(248 250 252);
}

.roster-table th.is-sticky-2,
.roster-table td.is-sticky-2 {
  left: var(--sticky-2-left, 7.25rem);
  z-index: 2;
  box-shadow: 1px 0 0 rgb(226 232 240);
}

.roster-table th.is-sticky-2 {
  z-index: 7;
  background: rgb(248 250 252);
}

.roster-table td {
  padding: 0.15rem 0.3rem;
  border-bottom: 1px solid rgb(241 245 249);
  vertical-align: middle;
  background: white;
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.roster-table tbody tr:hover td {
  background: rgb(248 250 252);
}

.roster-table tr.is-tryout td {
  background: rgb(255 251 235);
}

.roster-table tr.is-tryout:hover td {
  background: rgb(255 247 237);
}

.roster-table tr.is-double td.is-sticky {
  box-shadow: inset 3px 0 0 rgb(220 38 38);
}

.roster-table td.is-dup-number {
  background: rgb(255 247 237);
}

.roster-table tbody tr:hover td.is-dup-number,
.roster-table tr.is-tryout td.is-dup-number,
.roster-table tr.is-tryout:hover td.is-dup-number {
  background: rgb(255 237 213);
}

.roster-table td.is-dup-number input {
  background: rgb(255 237 213);
  color: rgb(154 52 18);
  font-weight: 800;
  border-color: rgb(253 186 116);
}

.roster-table td.is-dup-number input:hover,
.roster-table td.is-dup-number input:focus {
  background: rgb(254 215 170);
  border-color: rgb(251 146 60);
  box-shadow: 0 0 0 3px rgb(251 146 60 / 0.22);
}

.roster-table tr.is-hidden-by-search {
  display: none;
}

.roster-table input,
.roster-table select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 0.35rem;
  padding: 0.4rem 0.45rem;
  color: rgb(30 41 59);
}

.roster-table td.is-sticky input,
.roster-table td.is-sticky-2 input {
  font-weight: 600;
}

.roster-table input:hover {
  border-color: rgb(226 232 240);
  background: white;
}

.roster-table input:focus {
  outline: none;
  border-color: rgb(147 197 253);
  background: white;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.12);
}

.roster-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  padding-right: 0.4rem;
}

.roster-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.roster-badge-tryout {
  background: rgb(254 243 199);
  color: rgb(146 64 14);
}

.roster-badge-double {
  background: rgb(254 226 226);
  color: rgb(153 27 27);
}

.roster-badge-dup-number {
  background: rgb(255 237 213);
  color: rgb(154 52 18);
}

.roster-delete-btn {
  border: none;
  background: transparent;
  color: rgb(148 163 184);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
}

.roster-delete-btn:hover {
  background: rgb(254 242 242);
  color: rgb(185 28 28);
}

.roster-table-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: rgb(148 163 184);
  font-size: 0.875rem;
}

.roster-group-row.is-stuck {
  position: sticky;
  top: var(--sticky-group-top, 2.25rem);
  z-index: 5;
}

.roster-group-row td {
  background: rgb(241 245 249) !important;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: rgb(51 65 85);
  border-bottom: 1px solid rgb(226 232 240);
  box-shadow: 0 1px 0 rgb(226 232 240);
}

.roster-group-label {
  position: sticky;
  left: 0.75rem;
  display: inline-block;
}

#team-list.no-search-results::after {
  content: 'No matching teams';
}

#team-list:empty::after {
  content: 'No teams found';
}

#column-list.no-search-results::after {
  content: 'No matching columns';
}

#column-list:empty::after {
  content: 'No columns';
}

#column-list {
  max-height: 14rem;
}
