* {
  box-sizing: border-box;
}

.container {
  margin: auto;
  max-width: 1000px;
}

.players-container {
  display: flex;
  justify-content: space-around;
}

.meta {
  background: #f8f8f8;
  border: 1px solid black;
  border-radius: 4px;
  margin: 1em auto;
}

.player {
  border-radius: 4px;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.5em;
}

.player.current-break {
  background: #bae6ba;
}

.player:nth-child(1) {
  margin-right: 2em;
}

@media (max-width: 700px) {
  .players-container {
    flex-direction: column;
  }

  .player:nth-child(1) {
    margin-right: 0;
  }
}

.player__actions {
  display: flex;
  margin: 0.2em 0;
}

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

.player__name input {
  border: 1px solid black;
  border-radius: 4px;
  font-family: inherit;
  font-size: inherit;
  padding: 0.25em;
  width: 100%;
}

.player__name input:not(:placeholder-shown) {
  background: transparent;
  border-color: transparent;
}

.color,
.foul,
.free-ball,
.end-of-break {
  align-items: center;
  border: 1px solid black;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  flex: 1;
  justify-content: center;
  margin-left: 3px;
  margin-right: 3px;
  user-select: none;
}

.color:before,
.foul:before,
.free-ball:before,
.end-of-break:before {
  content: "";
  display: inline-block;
  padding-top: 100%;
}

.red {
  background: red;
}

.yellow {
  background: yellow;
}

.green {
  background: green;
}

.brown {
  background: brown;
}

.blue {
  background: blue;
}

.pink {
  background: pink;
}

.black {
  background: black;
}

.free {
  background: white;
}

.center {
  text-align: center;
}

.meta__item {
  display: flex;
  justify-content: space-between;
  padding: 0.25em;
}

.meta__item:has(> [data-snookers-required]) {
  display: none;
}

.meta__item:has(> .snookers-required) {
  background: green;
  color: white;
  display: block;
}

.meta__item span {
  font-weight: bold;
}

.snookers-required {
  display: block;
  text-align: center;
}

.hidden {
  display: none;
}

.invisible {
  visibility: hidden;
}

.undo .btn {
  background: red;
  border: 1px solid black;
  border-radius: 4px;
  color: white;
  padding: 0.5em;
  width: 100%;
}

[data-player-one-score],
[data-player-two-score] {
  font-weight: bold;
}

.current-break-display {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  min-height: calc(16px + 0.4em);
}

.current-break-display__pot {
  border: 1px solid black;
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  margin: 0.1em 0;
  width: 8px;
}

.current-break-display__pot:not(:last-child) {
  margin-right: 3px;
}
