@import url('vendors.css');
@import url('variables.css');
@import url('fonts.css');

/* Base */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  height: 100%;
  font-size: var(--main-font-size);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  flex-direction: column;
  min-height: 100%;
  color: var(--main-text);
  font: normal 125% / 1.4 var(--main-font);
  font-size: var(--main-font-size);
  background: #000;
}

h1,
h2,
h3 {
  padding: 0;
  margin: 0;
  font-weight: 400;
  line-height: 1em;
}

p {
  margin: 0 0 2em 0;
  line-height: 1.5em;
  padding: 0;
}

p:last-child {
  margin-bottom: 0;
}

b,
strong {
  font-weight: 800;
}

/* Layout */
.container {
  display: flex;
  width: 100%;
  max-width: var(--max-container-width);
  min-width: var(--min-container-width);
  margin-left: auto;
  margin-right: auto;
}

/* Scoreboard */
.scoreboard {
  flex: 1;
  padding: 1.8rem 0 1.8rem 2.8rem;
  background-color: var(--main-background);
}

.scoreboard h1 {
  font-family: var(--second-font);
  font-size: 5rem;
  font-weight: 800;
  margin: -0.15em 0 0.66em 0;
}

.scoreboard h2 {
  font-family: var(--main-font);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.075em;
}

.scoreboard-table {
  width: 100%;
}

.scoreboard-table__body {
  opacity: 1;
}

.scoreboard-table__body_active {
  opacity: 1;
}

.scoreboard-table__head,
.scoreboard-table__row {
  display: grid;
  grid-template-columns: 3rem repeat(7, 1fr) 3rem;
}

.scoreboard-table__row {
  cursor: pointer;
}

.scoreboard-table__row_animated {
  animation: FadeIn 0.25s linear;
  animation-fill-mode: both;
}

.scoreboard-table__head .scoreboard-table__col.scoreboard-table__col_accent,
.scoreboard-table__row .scoreboard-table__col.scoreboard-table__col_accent {
  background-color: var(--table-accent);
}

.scoreboard-table__row.scoreboard-table__row_highlight .scoreboard-table__col {
  background-color: var(--table-highlight);
  color: var(--main-background);
  font-weight: 800;
}

.scoreboard-table__row.scoreboard-table__row_kickout-line .scoreboard-table__col {
  border-bottom: solid 0.2rem #fff;
  margin-bottom: 0;
}

.scoreboard-table__row .scoreboard-table__col.scoreboard-table__col_score {
  font-weight: 800;
}

.scoreboard-table__head .scoreboard-table__col {
  color: var(--table-highlight);
  background-color: var(--table-background);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 2.8rem;
  text-align: center;
  letter-spacing: 0.075em;
  border-bottom: solid 0.2rem #fff;
}

.scoreboard-table__row .scoreboard-table__col {
  background-color: var(--table-background);
  line-height: 2.8rem;
  text-align: center;
  margin-bottom: 0.2rem;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: background 0.25s ease-in-out;
}

.scoreboard-table__row .scoreboard-table__col_next {
  font-size: 0.8rem;
  letter-spacing: 0.075em;
  background-color: var(--table-highlight);
  color: var(--main-background);
}

.scoreboard-table__row .scoreboard-table__col_next:before {
  content: 'Next';
  display: inline;
  text-transform: uppercase;
}

.scoreboard-table__row .scoreboard-table__col_place {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--table-highlight);
}

.scoreboard-table__row .scoreboard-table__col_qualified {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/qualified.svg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
}

.scoreboard-table__footer {
  display: flex;
  font-size: 0.8rem;
  padding: 0.8em 0;
}

.scoreboard-table__footer .item {
  display: flex;
  align-items: center;
  margin: 0 1.25rem;
}

.scoreboard-table__footer .item img {
  margin-right: 0.4rem;
}

.scoreboard-table__footer .item:first-child {
  margin-left: 0;
}
.scoreboard-table__footer .item:last-child {
  margin-right: 0;
}

/* Info Panel */
.info-panel {
  flex-basis: 19.8rem;
  padding: 2rem 1.2rem 1.8rem 1.2rem;
  background-color: var(--main-background);
  font-size: 0.8rem;
}

.player-info {
  transition: opacity 0.25s ease-in-out;
}

.player-info_animated {
  opacity: 0;
  transition: none;
}

.player-info__top {
  display: flex;
  align-items: flex-end;
}

.player-info__photo {
  display: block;
  width: 50%;
  height: auto;
}

.player-info__place {
  font-size: 3.5rem;
  font-family: var(--second-font);
  line-height: 1.1em;
  padding-left: 1rem;
}

.player-info__name {
  margin: 0.5em 0 0 0;
  font-size: 1rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.player-info__country {
  margin: 0.25em 0 2em 0;
  line-height: 1em;
}

.player-info h3 {
  color: var(--table-highlight);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  margin-bottom: 0.5em;
}

.timetable {
  margin-top: 1.5rem;
}

.timetable__header {
  margin: 0.5em 0 0 0;
  font-size: 1rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.timetable dl {
  display: flex;
  flex-wrap: wrap;
  margin: 0.75em 0 0 0;
  padding: 0;
  line-height: 1.88em;
}

.timetable dt {
  margin: 0;
  padding: 0 1rem 0 0;
  width: 20%;
  border-right: solid 1px var(--main-text);
}

.timetable dd {
  margin: 0;
  padding: 0 0 0 1rem;
  width: 80%;
}

/* Partners */
.partners {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-basis: 10rem;
  margin-left: 0.8rem;
  background-color: var(--main-text);
  color: var(--main-background);
}

.partners__top {
  padding-top: 1.4rem;
  text-align: center;
}

.partners__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 0.5rem;
}

.partners__bottom img {
  margin-bottom: 1.4rem;
}

.partners__bottom .time {
  font-weight: 800;
}

@keyframes FadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Media Queries */
@media only screen and (max-width: 1600px) {
  html,
  body {
    font-size: 16px;
  }
}

@media only screen and (max-width: 1279px) {
  html,
  body {
    font-size: 18px;
  }

  body {
    display: block;
  }

  .container {
    flex-wrap: wrap;
    overflow: hidden;
  }

  .scoreboard {
    width: 100%;
    padding: 1.333rem;
  }

  .info-panel {
    width: 64%;
    flex-basis: auto;
    padding: 1.333rem;
  }

  .partners {
    width: 36%;
    flex-basis: auto;
    margin-left: 0;
  }

  .partners__top {
    padding-top: 1.333rem;
  }

  .partners__bottom {
    padding-bottom: 1.333rem;
  }
}

@media only screen and (max-width: 1023px) {
  html,
  body {
    font-size: 16px;
  }
}

@media only screen and (max-width: 768px) {
  html,
  body {
    font-size: 14px;
  }
}

@media only screen and (max-width: 600px) {
  html,
  body {
    font-size: 12px;
  }

  .scoreboard h1 {
    font-size: 4rem;
  }

  .timetable dt {
    width: 14%;
  }

  .timetable dd {
    width: 86%;
  }
}

@media only screen and (max-width: 479px) {
  .scoreboard h1 {
    font-size: 3rem;
  }

  .scoreboard-table__col_hide {
    display: none !important;
  }

  .scoreboard-table__head,
  .scoreboard-table__row {
    display: grid;
    grid-template-columns: 3rem repeat(5, 1fr) 2.5rem;
  }
}
