body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: block;
    flex-direction: row;
    justify-content: center;
    align-content: flex-start;
    font-family: sans-serif;
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px;
    display:flex;
    align-items: center;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 18px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

table {
    width: 100%;
    margin-bottom: 20px;
}

th {
    font-weight: bold;
    text-align: left;
    padding: 8px;
}

td {
    padding: 8px;
}

textarea {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    resize: vertical;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
  }

/* h1 {
    font-size: 28px;
    text-align: center;
    border-bottom: solid black thin;
    font-size: 14pt;
} */

h2 {
    font-size: 12pt;
    margin-bottom: 0.2em;
}

strong {
    font-weight: bold;
}

.error-message {
    color: red;
    font-weight: bold;
    display: none;
}

.container {
    display: inline-flex;
}

#controls {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    margin-right: 2em;
}

#controls > div {
    position: relative;
}

#controls h1 {
    font-variant: small-caps;
    text-align: center;
}

#controls button {
    width: 100%;
}

#controls th {
    white-space: nowrap;
    text-align: right;
}

#controls .sliderLabel {
    width: 2em;
    text-align: center;
    overflow: hidden;
}

#controls #playerNames, #controls #forbiddenPairs, #controls #discouragedGroups {
    width: 100%;
    box-sizing: border-box;
    resize: none;
}

#controls p {
    font-size: 10pt;
    max-width: 305px;
}

#results {
    /* width: 100%; */
    /* max-width: 600px; */
    flex: 1;
    margin: 20px auto;
    padding: 20px;
    background-color: #f5f5f5;
}

#results .conflictScore {
    font-size: 10pt;
    font-weight: normal;
    float: right;
}

#results .groups {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#results .groups .group {
    min-width: 120px;
}

#results .groups .group ul {
    margin-top: 0.2em;
    padding-left: 20px;
}

.resultsSummary button {
    float: right;
    margin-left: 1em;
}

input[type=range]::-moz-range-track {
  height: 5px;
  background: #ddd;
  border: none;
  border-radius: 3px;
}

input[type=range]:focus::-moz-range-track {
  background: #ccc;
}

#hide-help-link {
    display: none;
}

/* #show-help-link::before {
    content: "[Show Help]";
    color: #888;
    font-size: 14px;
}

#hide-help-link::before {
    content: "[Close Help]";
    color: #888;
    font-size: 14px;
}

#show-help-link:hover,
#hide-help-link:hover {
    text-decoration: underline;
} */
.help-text {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    display: none;
    z-index: 10;
    position: absolute;
    box-sizing: border-box;
    left: 100%;
    margin-left: 4px;
    width: 425px;
    background-color: white;
    border: #666 solid thin;
    padding: 1em;
    font-size: smaller;
}

/*
CSS-only loading spinner
source: https://stephanwagner.me/only-css-loading-spinner
*/

@keyframes spinner {
  from {transform: rotate(0deg);}
  to {transform: rotate(360deg);}
}

.spinner {
  position: relative;
}
 
.spinner:before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  margin-left: -8px;
  border-radius: 50%;
  border: 2px solid #ccc;
  border-top-color: #000;
  animation: spinner .6s linear infinite;
}

.sidenav {
    width: 25%;
    background-color: #f0f0f0;
    padding: 0px;
}

#forRoundsSlider {
    width:70%;
}

#suggestedRounds{
    font-size: small;
    color: gray;
    vertical-align: middle;
}

#playerCountComparison {
    color: blue;
    font-style: italic;
    font-size: 75%;
}

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

    .sidebar {
        width: 100%;
    }
}

/*
Print mode: Something you could hand out to participants.
- Full-width results
- Hide controls
- Hide conflict scores
- Hide results footer (timing and export controls)
- Avoid splitting round results across multiple pages
*/
@media print {
  #results { width: unset; }
  #controls { display: none; }
  .conflictScore { display: none; }
  .resultsSummary { display: none; }
  .round { break-inside: avoid; }
}