@import url('https://fonts.googleapis.com/css2?family=Radio+Canada:ital,wght@0,300..700;1,300..700&display=swap');

@media (prefers-color-scheme: light) {
  :root {
    --background-color: #f0f0f0;
    --bar-background-color: #808080;
    --drag-background-color: #909090;
    --input-background-color: #909090;
    --button-hover: #b0b0b0;
    --text-color: #000000;
    --hr-color: #d0d0d0;
    --a-color: #203080;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #202020;
    --bar-background-color: #303030;
    --drag-background-color: #404040;
    --input-background-color: #404040;
    --button-hover: #505050;
    --text-color: #ffffff;
    --hr-color: #505050;
    --a-color: #a0b0f0;
  }
}

html, body {
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
}

body {
  width: 100dvw;
  height: 100dvh;
  
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: "Radio Canada", Arial, sans-serif;

  margin: 0;
  padding: 0;
  overflow: hidden;
  
  user-select: none;
}

p {
  margin: 0.2em 0 0.2em 0;
}

h2 {
  text-align: center;
  margin: 0 0 0.1em 0;
}

a {
  color: var(--a-color);
  text-decoration: underline;
}

a:hover {
  font-weight: bold;
}

a:visited {
  color: var(--a-color);
}

hr {
  border: 2px solid var(--hr-color);
  margin: 1em 0;
}

input, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background-color: var(--input-background-color);
  
  border: 1px solid var(--hr-color);
  border-radius: 2px;
  
  margin: 2px;
}

button:hover {
  background-color: var(--button-hover);
}

/* Tally Center */

#tally {
  position: absolute;
  z-index: -1;
  
  width: 100%;
  height: 100%;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#tally-count {
  font-size: min(80vw, 60vh);
}

/* Bars and Drags */

.drag {
  background-color: var(--drag-background-color);
  height: 3em;
}

.drag-icon-container {
  height: 3em;
  width: 100%;
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.info {
  height: 3em;
  width: 50px;
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.info-icon {
  transform: scale(1.5);
}

.drag-icon {
  transform: scale(2);
}

.bar {
  position: absolute;
  background-color: var(--bar-background-color);
  width: 100%;
}

.content {
  padding: 8px;
}

#bottom {
  min-height: calc(100dvh - 3em - 16px);
}

#buttom.content {
  overflow-y: scroll;
}

/* Overlay Menus */

.overlay-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.overlay-menu.active {
  visibility: visible;
  opacity: 1;
}

.overlay-content {
  color: #ffffff;
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
}

#importFileInput {
  display: none;
}

.center-items {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}