/* Shared League primitives. Page-specific layout lives in:
   - league_list.css
   - league_teampage.css
   - league_allfixtures.css */

.league-index-page,
.league-season-page,
.league-review-page,
.league-next-page {
  width: 100%;
  max-width: 1272px;
  margin-right: auto;
  margin-left: auto;
}

.league-kicker {
  display: block;
  margin-bottom: 6px;
  color: #ffdf00;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.league-season-hero,
.league-public-panel,
.league-dashboard__hero,
.league-panel,
.league-season-summary article {
  /* background: #101115; */
  background: #171718;
  border: 1px solid #2a2d35;
  border-radius: 14px;
}

.league-progress-bar span {
  width: var(--progress-width);
}

.league-public-panel,
.league-panel {
  padding: 18px;
}

.league-season-hero h1,
.league-dashboard__hero h2,
.league-public-panel__head h2,
.league-panel__head h3,
.league-division-block__head h3 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

.league-season-hero p,
.league-dashboard__hero p,
.league-season-progress span,
.league-season-summary span,
.league-dashboard__meta,
.league-division-block__head span,
.league-division-block__head strong {
  color: #aeb3bf;
}

.league-public-panel__head,
.league-panel__head,
.league-division-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.league-season-progress {
  display: grid;
  gap: 8px;
  align-content: center;
}

.league-season-progress strong {
  color: #ffdf00;
}

.league-progress-bar {
  height: 8px;
  overflow: hidden;
  background: #262830;
  border-radius: 999px;
}

.league-progress-bar span {
  display: block;
  height: 100%;
  background: #ffdf00;
}

.league-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.league-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: #fff;
}

.league-table th,
.league-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.league-table th {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.league-table tbody tr.is-current-team {
  background: rgba(255, 223, 0, 0.11);
}

.league-team-cell,
.league-team-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.league-team-cell span,
.league-team-chip span,
.league-team-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-team-cell:hover,
.league-team-chip:hover {
  color: #ffdf00;
}

.league-team-cell img,
.league-team-chip img,
.league-fixture__team img,
.league-team-fallback {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #171a22;
}

.league-team-cell img,
.league-team-chip img,
.league-fixture__team img {
  object-fit: cover;
}

.league-team-fallback {
  display: inline-grid;
  place-items: center;
  color: #ffdf00;
  background: rgba(255, 223, 0, 0.12);
  border: 1px solid rgba(255, 223, 0, 0.34);
}

.league-team-fallback i {
  font-size: 1rem;
  line-height: 1;
}

.league-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 223, 0, 0.12);
  color: #ffdf00;
  font-size: 0.72rem;
  font-weight: 900;
}

.league-status--active,
.league-status--scheduled,
.league-status--played,
.league-status--confirmed {
  background: rgba(36, 196, 107, 0.16);
  color: #62d783;
}

.league-status--disputed,
.league-status--cancelled {
  background: rgba(255, 90, 102, 0.15);
  color: #ff737f;
}

.league-status--needs_review,
.league-status--needs-review,
.league-status--awaiting_result,
.league-status--awaiting-result {
  background: rgba(255, 178, 36, 0.16);
  color: #ffca5f;
}

.league-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #171a22;
  color: #fff;
  border-radius: 9px;
  padding: 9px 14px;
  font-weight: 900;
  text-decoration: none;
}

.league-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.league-btn--primary {
  border-color: rgba(255, 223, 0, 0.48);
  background: rgba(255, 223, 0, 0.15);
  color: #ffdf00;
}

.league-btn--primary:hover {
  color: #ffdf00;
  background: rgba(255, 223, 0, 0.21);
}

.league-btn--ghost {
  background: transparent;
}

.league-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 130px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.league-empty--compact {
  min-height: 90px;
}

.league-empty i {
  color: #ffdf00;
  font-size: 1.55rem;
}

.league-empty strong {
  color: #fff;
}

.league-score-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.league-season-link {
  display: inline-flex;
  color: #ffdf00;
  font-weight: 900;
  text-decoration: none;
}

.league-proposal-list {
  display: grid;
  gap: 10px;
}

.league-proposal {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: #08090c;
  border: 1px solid #252832;
  border-radius: 12px;
}

.league-proposal strong,
.league-proposal time {
  color: #fff;
}

.league-proposal p,
.league-proposal small {
  margin: 0;
  color: #aeb3bf;
}

.league-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.league-propose-form {
  display: grid;
  gap: 10px;
}

.league-propose-form__fields {
  display: grid;
  gap: 10px;
}

.league-propose-form__datetime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.league-propose-form__datetime input[type="date"] {
  grid-column: 1 / -1;
}

.league-propose-form__datetime select {
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: #ffdf00 #111318;
}

.league-propose-form__datetime select::-webkit-scrollbar {
  width: 9px;
}

.league-propose-form__datetime select::-webkit-scrollbar-track {
  background: #111318;
  box-shadow: none;
}

.league-propose-form__datetime select::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 2px solid #111318;
  border-radius: 999px;
  background: #ffdf00;
  background-image: none;
  box-shadow: none;
}

.league-propose-form__datetime select::-webkit-scrollbar-thumb:hover {
  background: #ffe84d;
  background-image: none;
  box-shadow: none;
}

.league-propose-form__datetime input[type="date"] {
  color-scheme: dark;
  accent-color: #ffdf00;
}

.league-propose-form__datetime input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(76%) sepia(97%) saturate(1536%) hue-rotate(359deg) brightness(103%) contrast(105%);
}

.league-propose-form__time-separator {
  color: #aeb3bf;
  font-weight: 900;
}

.league-propose-form .gh-input,
.league-next-form .gh-input {
  width: 100%;
  min-height: 44px;
  background: #080a0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #fff;
  padding: 10px 12px;
}

.league-propose-form textarea.gh-input {
  resize: vertical;
  min-height: 44px;
  max-height: 90px;
}

@media (max-width: 640px) {
  .league-score-inputs {
    grid-template-columns: 1fr;
  }

  .league-public-panel,
  .league-panel {
    padding: 14px;
  }
}