/*
 trivia.ju.io stylesheet
 */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}
body {
  display: flex;
  flex-direction: column;
  height: 100vh;

  font: normal 400 16px/1.64 "Roboto", sans-serif;
  color: #212121;
  background: #ffffff;
}

.page-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(96, 125, 139, 0.75);  /* #607d8b blue-grey */
}

.page-status {
  font: normal 400 28px/2 "Roboto", sans-serif;
}

.hidden {
  display: none;
}

h1, h2, h3, h4, summary {
  font-weight: 300;
  line-height: 1;
}
h2, h3, h4 {
  margin-bottom: 0.25em;
}
h2 {
  font-size: 1.4em;
}
h3 {
  font-size: 1.1em;
}
h4 {
  font-size: 1.0em;
}
summary {
  font-size: 1.2em;
}

.page-header {
  height: 50px;
  position: relative;
  z-index: 1;
  text-align: center;
  background: #4db6ac;
}

.page-header h1 {
  line-height: 50px;
}

a {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
a:hover {
  background: rgba(0,0,0,0.1);
}
p {
  margin: .2em 0;
}
strong, b {
  font-weight: 500;
}
ul {
  padding-left: 1.6em;
}
li {
  margin: 0.1em 0;
}
ul.unstyled {
  padding-left: 0;
  list-style: none;
}


button, .button {
  font: normal 400 13px/50px "Roboto", sans-serif;
  border: none;
  border-radius: 2px;
  display: inline-block;
  height: 50px;
  line-height: 50px;
  outline: 0;
  padding: 0 2rem;
  margin-bottom: .6rem;
  text-transform: uppercase;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  color: #ffffff;
  background: #009688;
}
button:hover, .button:hover {
  background: #00897b;
}
button.flat, .button.flat {
  color: #212121;
  background: transparent;
}
button.flat:hover, .button.flat:hover {
  background: #eceff1;
}

button.tiny, .button.tiny {
  height: 25px;
  line-height: 26px;
  padding: 0 1rem;
}

button.positive, .button.positive {
  background: #4caf50;
}
button.positive:hover, .button.positive:hover {
  background: #43a047;
}
button.negative, .button.negative {
  background: #f44336;
}
button.negative:hover, .button.negative:hover {
  background: #e53935;
}

dl, ul.unstyled {
  margin-bottom: .5rem;
}
dl dt {
  float: left;
  width: 50%;
}
dl dd {
  margin-left: 1rem;
}
dl:after, dl:before {
  display: table;
  content: ' ';
}
dl:after {
  clear: both;
}
.hidden {
  display: none;
}

main {
  display: flex;
  flex-flow: column nowrap;
  height: calc(100vh - 50px);
}

.page-header .menu-trigger {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  border: none;
  padding: 15px;
}
.menu-trigger {
  border-radius: 0;
}
.menu-trigger svg {
  position: relative;
  right: 0;
}

aside {
  position: fixed;
  top: 0;
  right: -105%;
  transition: right .3s ease-in-out;
  height: 100vh;
  width: 350px;
  max-width: 90%;
  background: #ffffff;
  color: #607d8b;
  z-index: 2;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
aside.open {
  right: 0%;
}
.sidebar {
  padding: .5em;
  flex: 3 0;
}
.sidebar.playerlist {
  overflow-y: auto;
}
footer.sidebar {
  flex: 1 1;
  display: flex;
}
footer div {
  align-self: flex-end;
}

.question-container {
  flex: 1;
  padding: 1em;
  display: flex;
  justify-content: center;
  flex-direction: column;
}
.question-container p {
  text-align: center;
}
.question {
  font: normal 300 18px/1.2 "Roboto", sans-serif;
  padding: 0 .2rem;
  align-self: center;
}
.question br {
  display: none;
}
.question-info {
  display: none;
  color: #607d8b;
}
.question-categories {
}
.question-hint {
  font-size: 0.9em;
}
.question-hint kbd {
  letter-spacing: .15em;
  background: rgba(96, 125, 139, .5);  /* #607d8b */
  border: 1px solid rgba(96, 125, 139, .75);
  border-radius: .3em;
  padding: .3em;
}
.question-vote button {
  margin: 0 .5rem;
}

.timer {
  font: normal 500 10px/1.4 "Roboto", sans-serif;
  position: relative;
  background-color: rgba(236, 239, 241, 1); /* eceff1 */
  height: 12px;
  box-shadow: 0 10px 25px #eceff1;
}
.timer div {
  position: absolute;
  height: 12px;
}
.timer-value {
  width: 100%;
  text-align: center;
  will-change: width;
}
.timer-bar {
  will-change: background-color;
}
.timer-bar.colorless {
  background-color: rgba(0, 0, 0, .1);
}

.chat {
  flex: 1;
  overflow-y: scroll;
  padding: 1em;
  background: #eceff1;
}
.chat .system {
  color: #607d8b;
}
.chat p {
  display: flex;
}
.chat a {
  border-bottom: 1px solid #607d8b;
}
.chat span {
  flex: 1;
}
.chat time {
  display: none;
  align-self: flex-end;
  opacity: 0.25;
}
.chat p:hover time {
  opacity: 0.75;
}

.announce > span {
  position: relative;
}
.announce hr {
  border: none;
  border-bottom: 1px solid #b0bec5;
  margin: .75em 0;
}
.announce span span {
  position: absolute;
  top: 0;
  width: 100.5%;
  text-align: center;
}
.announce em {
  display: inline-block;
  font-style: normal;
  padding: 0 1em;
  background: #eceff1;
}

.chat-form button {
  display: none;
}
.chatinput {
  border: 1px solid rgba(0,0,0,.5);
  padding: .2em .4em;
}

select,
input[type=text],
input[type=password],
input[type=email],
input[type=url],
input[type=search],
input[type=date],
input[type=month],
input[type=year],
input[type=week],
input[type=number] {
  font: normal 400 16px/1.64 "Roboto", sans-serif;
  width: 100%;
}
select:focus {
  outline: 1px solid #26a69a;
}

.error {
  color: #f44336;
}
.form-input {
  position: relative;
  margin-top: 1rem;
}
.form-input label {
  color: #9e9e9e;
  position: absolute;
  top: 0.8rem;
  left: 0;
  font-size: 1rem;
  cursor: text;
  transition: all .2s ease-out;
}

.form-input select + label,
.form-input input:focus + label,
.form-input input:valid + label {
  font-size: .8rem;
  transform: translateY(-140%);
}
.form-input input,
.form-input select {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #9e9e9e;
  outline: none;
  height: 3rem;
  font-size: 1rem;
  margin: 0 0 15px 0;
  padding: 0;
  box-shadow: none;
  box-sizing: content-box;
  transition: all .3s;
}
.form-input input:focus + label,
.form-input select:focus + label {
  color: #26a69a;
}
.form-input input:focus {
  border-bottom: 1px solid #26a69a;
  box-shadow: 0 1px 0 0 #26a69a;
}


.page-modal {
  opacity: 0.0;
  transition: opacity .2s ease-in;
}
.page-modal.show {
  opacity: 1.0;
}
.modal-content {
  position: fixed;
  top: 0;
  left: 0;
  background: #fafafa;
  padding: 1rem;
  height: 100vh;
  width: 100vw;
  overflow-y: auto;
}

.modal-content h2 {
  max-width: calc(100vw - 100px);
}
.modal-content dt {
  float: none;
}

.modal-content .form-input {
  margin: 1rem 0;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 32px;
  height: 36px;
  width: 38px;
  padding: 0;
  text-align: center;
  font: normal 500 28px/36px 'Roboto', sans-serif;
}

.modal-form {
  margin-top: 2rem;
}


/* statistics */
table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
th, td {
  padding: .15rem .3rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
th {
  text-align: left;
  font-weight: 400;
}
th.left {
  text-align: left !important;
}
.numbers, .numbers thead th, .numbers td {
  text-align: right;
}
tbody tr:nth-child(even) {
  background: #eceff1;
}
tbody tr:hover {
  background: #cfd8dc;
}
td.numbers, .numbers td {
  font-weight: 300;
}
.numbers td {
  width: 15%;
}

.empty-table {
  color: #607d8b;
  text-align: center;
  font-size: 1.2em;
  padding: 1em;
}

@media screen and (max-width: 480px) {
  /* .responsive responsive table */
  table.responsive, .responsive thead, .responsive tbody, .responsive th, .responsive td, .responsive tr {
    display: block;
  }
  .responsive thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .responsive td {
    /*border: none;*/
    /*border-bottom: 1px solid #eee;*/
    position: relative;
    padding-left: 50%;
    width: auto;
  }
  .responsive td:before {
    position: absolute;
    top: 2px;
    left: 6px;
    padding-right: 10px;
    content: attr(data-legend);
    white-space: nowrap;
  }
}

.form-checkbox {
  margin-bottom: 10px;
  text-align: left;
}
.form-checkbox:last-child {
  margin-bottom: 0;
}

h2 + .progress {
  margin-top: 2rem;
}



/* stylings for larger screens only */
@media screen and (min-width: 1200px) {
  .page-status {
    font-size: 48px;
  }

  .question {
    font-size: 32px;
    padding: 0 10%;
  }

  .question br {
    display: inline;
  }

  .question-info {
    display: block;
  }

  .question-hint {
    font-size: 1.1em;
  }

  .sidebar {
    padding: 2em;
  }

  .modal-content {
    position: relative;
    top: auto;
    left: auto;
    padding: 2rem;
    width: auto;
    height: auto;
    margin: auto;
    max-height: 80%;
    min-width: 50%;
    max-width: 60%;
    border-radius: 2px;
  }

  .timer, .timer div {
    height: 20px;
    font-size: 16px;
    line-height: 1.5;
  }

  .chat time {
    display: inherit;
  }
}

/* keyboard opened on mobile devices */
@media screen and (max-height: 400px) {
  .chat {
    display: none;
  }
}
