/* Interactive Piqle-style lineup editor */

.lu-sheet {
  --lu-border: #e5e7eb;
  --lu-fill: #1f2937;
  --lu-bg: #111827;
  --lu-text: #f9fafb;
  --lu-muted: #9ca3af;
  --lu-accent: #84cc16;
  background: var(--lu-bg);
  color: var(--lu-text);
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid #374151;
}

/* Match banner with logos */
.lu-match-banner {
  background: linear-gradient(160deg, #1f2937 0%, #0f172a 55%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin-bottom: 4px;
}

.lu-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.lu-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.lu-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(0, 168, 107, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(0, 168, 107, 0.35);
}

.lu-chip-muted {
  background: rgba(156, 163, 175, 0.12);
  color: #d1d5db;
  border-color: #4b5563;
}

.lu-banner-date {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 14px;
}

.lu-teams-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.lu-team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lu-team-card-away {
  justify-content: flex-end;
  text-align: right;
}

.lu-team-copy {
  min-width: 0;
}

.lu-team-side {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.lu-team-title {
  font-size: 15px;
  font-weight: 800;
  color: #f9fafb;
  line-height: 1.25;
  margin-top: 2px;
  word-break: break-word;
}

.lu-vs {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #6ee7b7;
  background: rgba(0, 168, 107, 0.12);
  border: 1px solid rgba(0, 168, 107, 0.35);
}

.lu-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 4px;
  box-sizing: border-box;
}

.lu-logo-lg {
  width: 56px;
  height: 56px;
}

.lu-logo-sm {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 3px;
}

.lu-logo-fallback {
  background: #e5e7eb;
  color: #4b5563;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.lu-logo-lg.lu-logo-fallback {
  font-size: 16px;
}

.lu-roster-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lu-section-label {
  margin: 16px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

@media (max-width: 640px) {
  .lu-teams-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lu-vs {
    margin: 0 auto;
  }

  .lu-team-card,
  .lu-team-card-away {
    justify-content: flex-start;
    text-align: left;
  }

  .lu-team-card-away {
    flex-direction: row-reverse;
  }
}

.lu-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.lu-table th,
.lu-table td {
  border: 1px solid var(--lu-border);
  padding: 5px 6px;
  font-size: 13px;
  line-height: 1.25;
  vertical-align: middle;
}

.lu-fill {
  background: #374151;
}

.lu-center {
  text-align: center;
}

.lu-bold {
  font-weight: 700;
}

.lu-week {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: right;
  color: #f9fafb;
  white-space: nowrap;
}

.lu-team-head {
  font-weight: 700;
  text-align: center;
}

.lu-team-name {
  background: #374151;
  min-height: 30px;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
}

.lu-player-label {
  width: 1.2in;
  font-weight: 700;
  font-size: 12px;
  color: var(--lu-muted);
}

.lu-letter {
  width: 0.4in;
  text-align: center;
  font-weight: 800;
}

.lu-player {
  background: #0b1220;
  padding: 3px !important;
}

.lu-select {
  width: 100%;
  background: #0b1220;
  color: #f9fafb;
  border: 0;
  outline: none;
  font-size: 12px;
  padding: 6px 4px;
}

.lu-spacer {
  background: #374151;
  width: 0.35in;
}

.lu-game-num {
  width: 0.45in;
  text-align: center;
  font-weight: 800;
}

.lu-pair {
  width: 0.7in;
  text-align: center;
  font-weight: 800;
}

.lu-score {
  width: 0.95in;
  background: #374151;
  text-align: center;
  padding: 2px !important;
}

.lu-score-input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 2px;
  outline: none;
}

.lu-score-input::-webkit-outer-spin-button,
.lu-score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.lu-score-input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.lu-footer-label {
  font-weight: 700;
  text-align: left;
  padding-left: 8px;
}

.lu-roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .lu-roster-grid {
    grid-template-columns: 1fr;
  }
}

.lu-roster {
  background: #0b1220;
  border: 1px solid #374151;
  border-radius: 10px;
  overflow: hidden;
}

.lu-roster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #374151;
  background: #1f2937;
}

.lu-roster-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.lu-roster-team {
  font-size: 13px;
  font-weight: 700;
  color: #f9fafb;
  margin-top: 2px;
}

.lu-roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
}

.lu-reserved-block {
  border-top: 1px dashed #4b5563;
  background: rgba(180, 83, 9, 0.12);
}

.lu-reserved-label {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
}

.lu-reserved-list {
  max-height: 110px;
}

.lu-roster-item.lu-roster-reserved .lu-roster-name {
  color: #fde68a;
}

.lu-section-hint {
  margin-left: 8px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #6b7280;
  font-size: 11px;
}

.lu-roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #1f2937;
  font-size: 12px;
}

.lu-roster-item:first-child {
  border-top: 0;
}

.lu-roster-item.is-blocked {
  opacity: 0.55;
}

.lu-roster-item.is-assignable {
  cursor: pointer;
}

.lu-roster-item.is-assignable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lu-roster-item.is-assignable.is-assigned:hover {
  background: rgba(59, 130, 246, 0.18);
}

.lu-roster-item.lu-roster-reserved.is-assignable:hover {
  background: rgba(251, 191, 36, 0.08);
}

.lu-roster-name {
  font-weight: 600;
  color: #f3f4f6;
  flex: 1;
  min-width: 0;
}

.lu-roster-meta {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
}

.lu-roster-slot {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lu-roster-empty {
  padding: 14px 12px;
  color: #9ca3af;
  font-size: 12px;
}

.lu-avail-ok {
  color: #34d399;
}

.lu-avail-out {
  color: #f87171;
}

.lu-avail-maybe {
  color: #fbbf24;
}

.lu-avail-none {
  color: #9ca3af;
}

.lu-auto-btn {
  background: linear-gradient(135deg, #d9f99d, #84cc16, #4d7c0f);
  color: #14210a;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.lu-auto-btn:hover {
  background: #059669;
}

.lu-auto-bar {
  margin-top: 10px;
  text-align: center;
}

.lu-auto-both {
  padding: 8px 14px;
  font-size: 12px;
}

.lu-pairings-label {
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.lu-pairings .lu-pair-mid {
  text-align: center;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  background: #1f2937;
  width: 0.45in;
}

.lu-pair-names {
  text-align: left;
  vertical-align: middle !important;
  padding: 6px 8px !important;
}

.lu-pair-code {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.lu-pair-players {
  font-size: 12px;
  font-weight: 600;
  color: #f9fafb;
  line-height: 1.3;
  word-break: break-word;
}

.lu-assigned-summary {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #374151;
  background: #1f2937;
}

.lu-assigned-empty-banner {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.lu-assigned-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
}

.lu-assigned-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.lu-assigned-team {
  font-size: 12px;
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.lu-assigned-players {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lu-assigned-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #f3f4f6;
}

.lu-assigned-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #374151;
  color: #d1d5db;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.lu-assigned-empty {
  color: #6b7280;
  font-weight: 500;
}

@media (max-width: 560px) {
  .lu-assigned-grid {
    grid-template-columns: 1fr;
  }
}
