:root {
  --logo-color: green;
  --button-pressed-color: darkgreen;
  --text-secondary: gray;
  --unlocked-color: green;
  --loading-color: gray;
  --processing-color: orange;
  --locked-color: red;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Arial', 'Sans Serif';
  max-width: 1000px;
  padding: 15px 10px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.notice {
  margin: 20px 0;
  padding: 20px;
  background-color: lightblue;
  font-size: 1.1rem;
  border-radius: 3px;
}

.notice.logout {
  display: flex;
  justify-content: space-between;
}

.notice.logout button {
  margin: 0 0 0 auto;
}

.alert {
  margin: 20px 0;
  padding: 20px;
  background-color: red;
  font-size: 1.1rem;
}

main {
  margin: 30px auto;
}

main.index, main.login {
  max-width: 600px;
}

.form-basic {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 5px 15px;
  max-width: 500px;
}

main.game {
  max-width: 900px;
}

.logo {
  font-size: 30px;
  font-family: "Arial Black", "Arial";
  font-style: italic;
  color: var(--logo-color);
  user-select: none;
  text-decoration: none;
  display: block;
  border-top: 2px solid var(--logo-color);
  border-bottom: 2px solid var(--logo-color);
  text-align: center;
}

.logo:visited {
  color: var(--logo-color);
}

.instructions {
  background-color: var(--logo-color);
  color: white;
  padding: 10px;
  border-radius: 4px;
}

table.tournaments {
  width: min(90%, 400px);

  th {
    text-align: left;
  }

  th, td {
    padding: 5px;
  }

}

table.rooms {
  width: 100%;

  th {
    text-align: left;
  }

  th, td {
    padding: 5px 10px;
  }


  &.player {
    th:first-child, td:first-child {
      width: 30%;
    }
  }
}

table.rooms {
  width: 100%;

  th {
    text-align: left;
  }

  th, td {
    padding: 5px;
  }
}

.fake-row {
  padding: 20px 8px;

  input {
    width: 50%;
  }
}

button.action, a.action {
  font-family: 'Arial', 'Sans Serif';
  background-color: #f7f7f7;
  border-radius: 3px;
  padding: 3px 5px;
  border: 1px solid #424141;
  font-size: .9rem;
  margin: 10px 0;

  &:hover {
    background-color: #e2e2e2;
  }

  &.edit {
    color: #00693e;
  }

  &.delete {
    color: rgb(205, 62, 43);
  }
}

a.button {
  display: inline-block;
  text-decoration: none;
}

section.logs {
  .log-container {
    height: 15rem;
    overflow-y: scroll;
    border: 2px solid var(--unlocked-color);
    scrollbar-gutter: stable;
  }

  time {
    font-family: monospace;
    color: var(--text-secondary);
    margin-right: 10px;

    &::before {
      content: '['
    }

    &::after {
      content: ']'
    }
  }
}


/* Tournament-wide description shown above the room description */
.description {
  white-space: pre-line;
}
.tournament-description {
  padding: 10px 15px;
  border-left: 4px solid var(--logo-color);
  background-color: #f3f8f3;
}
.hint {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Category headings on the home page */
h3.category {
  margin: 25px 0 5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* Room ordering buttons on the admin tournament page */
td.order { white-space: nowrap; }
button.move {
  padding: 2px 6px;
  margin: 0 2px;
  font-size: 0.7rem;
}
button.move:disabled { opacity: 0.3; }

/* Light grid on the room tables so each room's description reads as its own row */
table.rooms {
  border-collapse: collapse;
  width: 100%;
}
table.rooms th, table.rooms td {
  border: 1px solid #ddd;
  padding: 6px 10px;
  vertical-align: top;
  text-align: left;
}
table.rooms th {
  background-color: #f6f6f6;
}
