/*
 * TrebleChasersODL
 * Division Playoff Bracket V2
 *
 * White / gold / cyan.
 * Responsive four-player knockout bracket.
 */

#divisionPlayoffProjectionContent.tc-playoff-bracket-root {
  display: grid;
  gap: 22px;
}

.tc-playoff-boundary {
  min-width: 0;
  padding: 18px;
  border: 1px solid #e9e0ce;
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #fffdf8 100%
    );
}

.tc-playoff-boundary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.tc-playoff-boundary-head > div {
  min-width: 0;
}

.tc-playoff-boundary-head small {
  display: block;
  color: #8c8374;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.tc-playoff-boundary-head strong {
  display: block;
  margin-top: 3px;
  color: #25221d;
  font-size: .95rem;
  font-weight: 950;
}

.tc-playoff-format {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(10, 176, 205, .26);
  border-radius: 999px;
  background: #f6fdff;
  color: #167f96;
  font-size: .62rem;
  font-weight: 950;
  white-space: nowrap;
}

.tc-playoff-board {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    64px
    minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.tc-playoff-round {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.tc-playoff-round-title {
  color: #8b8273;
  font-size: .59rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tc-playoff-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8decb;
  border-radius: 14px;
  background: #fff;
}

.tc-playoff-card.is-ready {
  border-color: rgba(7, 174, 204, .55);
  box-shadow:
    0 0 0 2px rgba(7, 174, 204, .07);
}

.tc-playoff-card.is-complete {
  border-color: rgba(194, 156, 60, .58);
  background:
    linear-gradient(
      180deg,
      #fffefb 0%,
      #fffaf0 100%
    );
}

.tc-playoff-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #eee5d5;
  background: #fbfaf7;
}

.tc-playoff-card-head strong {
  color: #332f28;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.tc-playoff-card-head span {
  color: #918675;
  font-size: .56rem;
  font-weight: 850;
}

.tc-playoff-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 11px;
}

.tc-playoff-player +
.tc-playoff-player {
  border-top: 1px solid #f0e9dc;
}

.tc-playoff-seed {
  width: 24px;
  color: #a08439;
  font-size: .58rem;
  font-weight: 950;
}

.tc-playoff-player-name {
  min-width: 0;
  overflow: hidden;
  color: #26231e;
  font-size: .78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-playoff-player.is-winner
.tc-playoff-player-name {
  color: #9a7620;
}

.tc-playoff-player.is-loser {
  opacity: .5;
}

.tc-playoff-result-mark {
  min-width: 22px;
  color: #b18b2f;
  font-size: .72rem;
  font-weight: 950;
  text-align: right;
}

.tc-playoff-state {
  padding: 9px 11px;
  border-top: 1px solid #eee5d5;
  color: #837a6d;
  font-size: .62rem;
  font-weight: 800;
}

.tc-playoff-state.is-live {
  color: #147f96;
}

.tc-playoff-state.is-confirmed {
  color: #9b7621;
}

.tc-playoff-submit {
  display: block;
  margin: 0 11px 11px;
  padding: 10px 12px;
  border: 1px solid #d8ae43;
  border-radius: 9px;
  background:
    linear-gradient(
      135deg,
      #fff7d7,
      #f5d36d
    );
  color: #272117;
  font-size: .68rem;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
}

.tc-playoff-connector {
  position: relative;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      #d8c89f,
      #b8e9f1
    );
}

.tc-playoff-connector::after {
  content: "";
  position: absolute;
  top: -4px;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 2px solid #8ed7e5;
  border-right: 2px solid #8ed7e5;
  transform: rotate(45deg);
}

.tc-playoff-final-placeholder {
  color: #978f82;
  font-style: italic;
}

.tc-playoff-empty {
  padding: 16px;
  border: 1px dashed #dccfae;
  border-radius: 12px;
  color: #867c6d;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 760px) {

  #divisionPlayoffProjectionContent,
  .tc-playoff-bracket-root {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .tc-playoff-boundary {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 14px;
  }

  .tc-playoff-boundary-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 14px;
  }

  .tc-playoff-boundary-head strong {
    font-size: .9rem;
    line-height: 1.25;
  }

  .tc-playoff-format {
    justify-self: start;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.2;
  }

  .tc-playoff-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .tc-playoff-round {
    width: 100%;
    min-width: 0;
    gap: 12px;
  }

  .tc-playoff-round-title {
    margin: 2px 0 0;
  }

  .tc-playoff-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 12px;
  }

  .tc-playoff-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px;
  }

  .tc-playoff-card-head strong {
    min-width: 0;
    line-height: 1.2;
  }

  .tc-playoff-card-head span {
    white-space: nowrap;
    font-size: .54rem;
  }

  .tc-playoff-player {
    grid-template-columns: 25px minmax(0, 1fr) 22px;
    gap: 8px;
    min-height: 50px;
    padding: 9px 10px;
  }

  .tc-playoff-player-name {
    min-width: 0;
    overflow: visible;
    white-space: normal;
    text-overflow: initial;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .tc-playoff-state {
    padding: 9px 10px;
    line-height: 1.35;
  }

  .tc-playoff-submit {
    min-height: 46px;
    margin: 0 10px 10px;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
  }

  /*
   * Desktop horizontal connector becomes
   * a proper downward mobile progression.
   */
  .tc-playoff-connector {
    position: relative;
    width: 2px;
    height: 34px;
    margin: -2px auto;
    background:
      linear-gradient(
        180deg,
        #d7b85e 0%,
        #77d9e9 100%
      );
  }

  .tc-playoff-connector::after {
    content: "";
    position: absolute;
    left: 50%;
    right: auto;
    top: auto;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #65cfe1;
    border-bottom: 2px solid #65cfe1;
    border-top: 0;
    transform:
      translateX(-50%)
      rotate(45deg);
  }

  .tc-playoff-final {
    margin-top: 0;
  }
}


@media (max-width: 430px) {

  .tc-playoff-boundary {
    padding: 9px;
  }

  .tc-playoff-boundary-head {
    margin-bottom: 12px;
  }

  .tc-playoff-card-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .tc-playoff-card-head span {
    white-space: normal;
  }

  .tc-playoff-player {
    min-height: 52px;
  }

  .tc-playoff-player-name {
    font-size: .76rem;
  }

  .tc-playoff-state {
    font-size: .61rem;
  }

  .tc-playoff-submit {
    width: calc(100% - 18px);
    margin-left: 9px;
    margin-right: 9px;
  }
}

/* TC-MOBILE-READABILITY-V1 */
@media (max-width: 430px) {

  .tc-playoff-boundary-head small {
    font-size: .66rem;
  }

  .tc-playoff-boundary-head strong {
    font-size: .96rem;
  }

  .tc-playoff-format {
    font-size: .68rem;
    padding: 7px 10px;
  }

  .tc-playoff-round-title {
    font-size: .65rem;
  }

  .tc-playoff-card-head strong {
    font-size: .74rem;
  }

  .tc-playoff-card-head span {
    font-size: .64rem;
  }

  .tc-playoff-seed {
    font-size: .65rem;
  }

  .tc-playoff-player-name {
    font-size: .86rem;
    line-height: 1.3;
  }

  .tc-playoff-state {
    font-size: .70rem;
    line-height: 1.4;
  }

  .tc-playoff-submit {
    min-height: 48px;
    font-size: .78rem;
  }

  .tc-playoff-result-mark {
    font-size: .82rem;
  }
}
