/* League information and the organizer's overview. */
#tfpCompetitionView .tfpli-public,
#tfpCompetitionView .tfpli-dashboard,
#tfpCompetitionView .tfpli-editor {
  --li-ink: #142e46;
  --li-muted: #4e6479;
  --li-border: #cbd8e6;
  --li-purple: #6137bf;
}

body[data-page="league-view"] #tfpCompetitionView #info.tfpli-public.active:not([hidden]),
#tfpCompetitionView .tfpli-dashboard {
  display: grid !important;
  gap: 14px;
  min-width: 0;
}

#tfpCompetitionView .tfpli-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #284c66;
  border-radius: 15px;
  background: linear-gradient(120deg, #0e293f, #1c4557);
  color: #fff;
}

#tfpCompetitionView .tfpli-hero > div { min-width: 0; }
#tfpCompetitionView .tfpli-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--li-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}
#tfpCompetitionView .tfpli-hero .tfpli-kicker { color: #cbdcf0 !important; }

body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpli-hero h3,
body[data-page="league-view"] #tfpCompetitionView.league-page #info .tfpli-hero h2 {
  margin: 0;
  color: #fff !important;
  font-size: clamp(22px, 4vw, 30px) !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere;
}

#tfpCompetitionView .tfpli-hero p {
  margin: 5px 0 0;
  color: #e1ebf6 !important;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#tfpCompetitionView .tfpli-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#tfpCompetitionView .tfpli-status,
#tfpCompetitionView .tfpli-section-count {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e7f5ee;
  color: #17563e;
  font-size: 12px;
  font-weight: 700;
}

#tfpCompetitionView .tfpli-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid #8ca7c0;
  border-radius: 9px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

#tfpCompetitionView .tfpli-overview-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
}

#tfpCompetitionView .tfpli-overview-facts > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #ffffff38;
  border-radius: 9px;
  background: #ffffff0c;
}

#tfpCompetitionView .tfpli-overview-facts dt {
  color: #e1ebf6;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
#tfpCompetitionView .tfpli-overview-facts dd {
  margin: 4px 0 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#tfpCompetitionView :is(.tfpli-public-grid, .tfpli-logistics, .tfpli-editor-fields, .tfpli-shortcut-grid) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

#tfpCompetitionView :is(.tfpli-card, .tfpli-editor, .tfpli-shortcuts) {
  min-width: 0;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--li-border);
  border-radius: 13px;
  background: #fff;
  color: var(--li-ink);
}

#tfpCompetitionView :is(.tfpli-card, .tfpli-editor, .tfpli-shortcuts) :is(h3, h4) {
  margin: 0 0 10px;
  color: var(--li-ink);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#tfpCompetitionView :is(.tfpli-facts, .tfpli-logistics) { margin: 0; }
#tfpCompetitionView .tfpli-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #e4ebf2;
}
#tfpCompetitionView :is(.tfpli-facts, .tfpli-logistics) dt {
  color: var(--li-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#tfpCompetitionView :is(.tfpli-facts, .tfpli-logistics) dd {
  min-width: 0;
  margin: 0;
  color: var(--li-ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#tfpCompetitionView .tfpli-facts dd { font-weight: 650; }
#tfpCompetitionView .tfpli-logistics dd { margin-top: 3px; }
#tfpCompetitionView .tfpli-text {
  margin: 0;
  color: var(--li-ink);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#tfpCompetitionView .tfpli-card--text { border-left: 3px solid #8e72d4; }
#tfpCompetitionView .tfpli-card--logistics { border-left: 3px solid #1e8986; }

#tfpCompetitionView .tfpli-points {
  width: 100%;
  min-width: 0;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
#tfpCompetitionView .tfpli-points :is(th, td) {
  padding: 8px 5px;
  border-bottom: 1px solid #e4ebf2;
  color: var(--li-ink);
  text-align: left;
  overflow-wrap: anywhere;
}
#tfpCompetitionView .tfpli-points thead th { background: #edf3f8; color: #385169; }
#tfpCompetitionView .tfpli-points :is(th, td):not(:first-child) { text-align: right; }
#tfpCompetitionView .tfpli-points td { font-variant-numeric: tabular-nums; }

#tfpCompetitionView .tfpli-season > div { flex: 1 1 230px; }
#tfpCompetitionView .tfpli-season-progress {
  padding: 9px 12px;
  border: 1px solid #ffffff36;
  border-radius: 10px;
  background: #ffffff0e;
}
#tfpCompetitionView .tfpli-season-progress p { margin: 0 0 5px; }
#tfpCompetitionView .tfpli-season-progress strong {
  color: #fff !important;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
#tfpCompetitionView .tfpli-season-progress small { color: #d7e7f7 !important; }
#tfpCompetitionView .tfpli-season-progress progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 7px 0;
  border: 0;
  border-radius: 99px;
  background: #497088;
  color: #5be1bc;
  accent-color: #5be1bc;
}
#tfpCompetitionView .tfpli-season-progress progress::-webkit-progress-bar { background: #497088; border-radius: 99px; }
#tfpCompetitionView .tfpli-season-progress progress::-webkit-progress-value { background: #5be1bc; border-radius: 99px; }
#tfpCompetitionView .tfpli-season-progress progress::-moz-progress-bar { background: #5be1bc; border-radius: 99px; }

body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpli-shortcut {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 62px !important;
  padding: 9px 11px !important;
  border: 1px solid var(--li-border) !important;
  border-radius: 9px !important;
  background: #f4f8fb !important;
  color: var(--li-ink) !important;
  text-align: left !important;
  white-space: normal !important;
  box-shadow: none !important;
  cursor: pointer;
}
body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpli-shortcut--information {
  border-color: #d3c5f2 !important;
  background: #f0e9fc !important;
}
#tfpCompetitionView .tfpli-shortcut :is(strong, small) { display: block; overflow-wrap: anywhere; }
#tfpCompetitionView .tfpli-shortcut strong { color: var(--li-ink) !important; font-size: 14px; }
#tfpCompetitionView .tfpli-shortcut small { margin-top: 3px; color: var(--li-muted) !important; font-size: 12px; line-height: 1.35; }
#tfpCompetitionView .tfpli-arrow { color: var(--li-purple) !important; font-weight: 750; }

#tfpCompetitionView :is(.tfpli-editor-head, .tfpli-sections-head, .tfpli-editor-actions) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}
#tfpCompetitionView .tfpli-editor-head { margin-bottom: 16px; }
#tfpCompetitionView .tfpli-editor :is(.tfpli-editor-head, .tfpli-sections-head) :is(h3, h4, p) { margin: 0; }
#tfpCompetitionView .tfpli-editor :is(.tfpli-editor-head, .tfpli-sections-head) p {
  margin-top: 4px;
  color: var(--li-muted);
  font-size: 13px;
  line-height: 1.45;
}
#tfpCompetitionView .tfpli-editor form { margin: 0; min-width: 0; }
#tfpCompetitionView .tfpli-editor label { display: grid; gap: 5px; min-width: 0; margin: 0; }
#tfpCompetitionView .tfpli-editor label > span { color: var(--li-ink) !important; font-size: 13px; font-weight: 700; }

body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpli-editor :is(input:not([type=hidden]), textarea) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #b9cadd !important;
  border-radius: 8px !important;
  background: #fbfcfe !important;
  color: var(--li-ink) !important;
  font: inherit;
  font-size: 16px !important;
  line-height: 1.45;
  box-shadow: none !important;
}
#tfpCompetitionView .tfpli-editor textarea { resize: vertical; }
#tfpCompetitionView .tfpli-sections-head { margin: 17px 0 8px; }
#tfpCompetitionView .tfpli-editor-sections { display: grid; gap: 10px; min-width: 0; }
#tfpCompetitionView .tfpli-editor-section {
  display: grid;
  gap: 8px;
  min-inline-size: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--li-border);
  border-radius: 9px;
  background: #f7f9fc;
}
#tfpCompetitionView .tfpli-editor-section legend { padding: 0 5px; color: var(--li-muted); font-size: 12px; font-weight: 650; }
#tfpCompetitionView .tfpli-editor-section-head {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 6px 8px;
}
#tfpCompetitionView .tfpli-editor-section-head label { flex: 1 1 180px; }
#tfpCompetitionView .tfpli-editor-actions { margin-top: 12px; }
#tfpCompetitionView [data-league-info-editor]:not([data-sections-ready]) :is([data-info-add], [data-info-remove]) { display: none !important; }

body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel :is(.tfpli-primary, .tfpli-secondary, .tfpli-remove) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  min-height: 44px !important;
  max-width: 100%;
  padding: 7px 12px !important;
  border: 1px solid var(--li-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--li-ink) !important;
  font: inherit;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: center;
  text-decoration: none;
  box-shadow: none !important;
  cursor: pointer;
}
body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpli-primary {
  border-color: var(--li-purple) !important;
  background: var(--li-purple) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpli-remove { color: #8d2f49 !important; }
#tfpCompetitionView .tfpli-editor button:disabled { opacity: .55; cursor: default; }
#tfpCompetitionView .tfpli-notice {
  margin-bottom: 13px;
  padding: 9px 11px;
  border: 1px solid #b7dfca;
  border-radius: 8px;
  background: #e9f7ef;
  color: #16583d;
}
#tfpCompetitionView .tfpli-notice p { margin: 0; }
#tfpCompetitionView .tfpli-notice.is-error { border-color: #ecc8d0; background: #fff0f3; color: #842c44; }
#tfpCompetitionView .tfpli-notice a { color: inherit; font-size: 13px; text-decoration: underline; }

#tfpCompetitionView :is(.tfpli-public, .tfpli-dashboard, .tfpli-editor) :is(button, a, input, textarea):focus-visible {
  outline: 2px solid #7850ce !important;
  outline-offset: 2px;
}

@media (min-width: 380px) {
  #tfpCompetitionView .tfpli-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 780px) {
  #tfpCompetitionView :is(.tfpli-public-grid, .tfpli-logistics) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  #tfpCompetitionView .tfpli-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tfpCompetitionView .tfpli-shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body[data-page="league-view"] main#tfpCompetitionView.league-page #manage #admin-panel .tfpx-manager-navigation > .tfpx-section-toggle {
    background: #14334d !important;
    color: #fff !important;
  }
  body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpx-section-toggle strong {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpx-section-toggle small {
    color: #d5e3f3 !important;
    -webkit-text-fill-color: #d5e3f3 !important;
  }
  body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpx-section-chevron { font-size: 0; }
  body[data-page="league-view"] #tfpCompetitionView.league-page #manage #admin-panel .tfpx-section-chevron::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
}
