@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/font/JetBrainsMono-Regular.ttf') format('truetype');
}

html,
body {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100vw;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.75);
  background-color: black;
  color: white;
}

select {
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  color: white;
  background-color: #191d21;
  float: right;
  margin-left: 5px;
  margin-top: 2px;
}

* {
  box-sizing: border-box;
}

#main-layout {
  width: 100vw;
  height: calc(100vh - 10px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 55px 1fr;
  gap: 10px;
  padding: 0px 10px;
}

.money {
  color: #3ae75c;
  text-shadow: 2px 2px 0 #276052;
}

.table {
  padding: 6px;
  width: 100%;
  border-collapse: collapse;
}

.icon {
  display: inline-block;
  font-size: calc(1em - 2px);
  width: 1em;
  height: calc(1em-2px);
  margin-right: 7px;
  top: -1px;
  position: relative;
}

.icon-tts::after {
  content: '🗣';
}

.icon-sfx::after {
  content: '🔊';
}

table td,
table th {
  padding: 2px 6px;
  font-weight: normal;
}

.popup-content {
  overflow-y: scroll;
  height: calc(100% - 26px);
}

#popup {
  height: calc(100vh - 75px);
}

#popup2 .popup-content {
  overflow: hidden;
}

.addr-head {
  font-size: 0.8em;
  color: #ffbe56;
  padding: 0px 6px;
  margin: 2px;
  margin-top: 8px;
}

#popup3 {
  height: 680px;
  width: min(750px, 100%);
  overflow: hidden;
}

#popup2 {
  height: 380px;
  width: min(550px, 100%);
  overflow: hidden;
}

.stat-column,
.popup {
  background-color: #191d21;
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  border: 1px solid #505050;

  display: flex;
  flex-direction: column;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: #969696 #191d2100;
  margin-bottom: 3px;
}

strong {
  text-decoration: underline;
}

.popup a {
  color: #8dd19b;
}

.xbutton {
  float: right;
  user-select: none;
  cursor: pointer;
  color: rgb(252, 241, 122);
}

.popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(350px, 100%);
  height: min(700px, 100%);
  z-index: 500;
}

.popup-title {
  user-select: none;
  cursor: move;
}

.column-header,
.popup-title {
  padding: 3px 6px;
  background-color: #740700;
  font-size: 1.1em;
  border-bottom: 1px solid #505050;
}

.column-content {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.user-name {
  font-weight: bold;
  color: rgb(150, 252, 213);
  cursor: pointer;
}

.stat-event {
  font-size: 1em;
  padding: 6px;
  border-bottom: 1px solid #505050;
  word-break: break-word;
  line-break: auto;
}

.timestamp {
  text-align: right;
  font-size: 0.8em;
  color: #a8a8a8;
}

.graph {
  margin: 10px;
}

svg {
  width: 100%;
  height: 100%;
}

#header {
  padding-top: 10px;
  grid-column: 1 / 5;
  text-align: center;
}

#disclaimer {
  font-size: 0.8em;
  color: rgb(197, 197, 197);
}

#banner {
  text-transform: uppercase;
}

#time {
  position: absolute;
  right: 5px;
  top: 5px;
  color: #6e6e6e;
  font-size: 0.8em;
}

#mail,
#dono,
#about,
.header-link {
  color: beige;
  text-decoration: none;
}

#dono,
#about {
  user-select: none;
  cursor: pointer;
}

.controls {
  position: absolute;
  left: 5px;
  top: 5px;

  font-size: 0.9em;
}

input[type='checkbox'] + label {
  position: relative;
  top: -1px;
  left: -5px;
}

.poll-bar {
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: linear-gradient(
    90deg,
    currentColor,
    currentColor 85%,
    transparent 0,
    transparent
  );
  color: #740700;
  background-size: 12px 100%;
  z-index: 0;
}

.poll-option-text {
  z-index: 1;
  position: relative;
  margin-left: 4px;
}

.poll-option {
  position: relative;
  background-color: #121517;
  border-radius: 2px;
  overflow: hidden;
}

.poll-list {
  padding: 0px;
  margin: 2px 4px;
}

.poll-list li {
  list-style-type: none;
  padding: 0px;
  margin: 4px 2px;
}

.spinner-label {
  margin-top: 90px;
}

.addr {
  font-family: monospace;
  font-size: 10pt;
  width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  border-radius: 1mm;
  padding: 1mm 2mm 1mm 2mm;
  user-select: all;
  margin: 0px;
}

.xbutton {
  top: 4px;
  right: 10px;
  position: absolute;
}
.lds-ripple,
.lds-ripple div {
  box-sizing: border-box;
}
.lds-ripple {
  display: inline-block;
  position: absolute;
  width: 80px;
  height: 80px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.lds-ripple div {
  position: absolute;
  border: 4px solid currentColor;
  opacity: 1;
  border-radius: 50%;
  animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
  animation-delay: -0.5s;
}
@keyframes lds-ripple {
  0% {
    top: 36px;
    left: 36px;
    width: 8px;
    height: 8px;
    opacity: 0;
  }
  4.9% {
    top: 36px;
    left: 36px;
    width: 8px;
    height: 8px;
    opacity: 0;
  }
  5% {
    top: 36px;
    left: 36px;
    width: 8px;
    height: 8px;
    opacity: 1;
  }
  100% {
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    opacity: 0;
  }
}

/* for small screens scroll the columns */
@media (max-width: 1600px) {
  #main-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 65px 1fr 1fr;
    padding-bottom: 10px;
  }
  #header {
    grid-column: 1 / 3;
  }
  .stat-column {
    height: calc(50vh - 47px);
  }
}

.column-header > a:hover {
  text-decoration: underline;
}

.column-header > a {
  color: white;
  text-decoration: none;
}

/* for mobile stack the layout vertically */
@media (max-width: 800px) {
  #main-layout {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #969696 #191d21;
  }
  #time {
    position: relative;
  }
  .stat-column {
    min-height: 300px;
  }
  .controls {
    position: relative;
  }
  table {
    font-size: 0.8em;
  }

  @supports (-webkit-appearance: none) {
    #graphs {
      /* Otherwise the search bar at the bottom blocks parts of the site for some reason on safari/ios */
      margin-bottom: 80px !important;
    }
  }
}
.column-header > a:hover {
  text-decoration: underline;
}

.column-header > a {
  color: white;
  text-decoration: none;
}
