@font-face {
  font-family: 'Bree5erif-Regular';
  src: url("./assets/Bree5erif-Regular.ttf");
}

@font-face {
  font-family: 'Bree5erif-Mono';
  src: url("./assets/Bree5erif-Mono.ttf");
}

@font-face {
  font-family: 'Bree-Regular';
  src: url("./assets/Bree-Regular.otf");
}

@font-face {
  font-family: 'Bree-Mono';
  src: url("./assets/Bree-Mono.ttf");
}

html {
  font-size: 0.056vw;
}

body {
  font-family: 'Bree5erif-Regular';
}

:root {
  --slider-date-scale: 1;
  
  --slider-tick-width: calc(4rem * var(--slider-date-scale));
  --slider-thumb-width: calc(30rem * var(--slider-date-scale));
  --slider-height: calc(30rem * var(--slider-date-scale));
}

.background {
  position: relative;
  left: 0;
  top: 0;
  z-index: -1;

  display: block;

  background: url(assets/space-60d.jpeg);
  background-size: cover;

  -webkit-filter: blur(5rem);
  -moz-filter: blur(5rem);
  -o-filter: blur(5rem);
  -ms-filter: blur(5rem);
  filter: blur(5rem);

  min-width: 100%;
  min-height: 100%;
}

.topnav {
  user-select: none;
  -webkit-user-select: none;
  overflow: visible;
  background-color: #333;
  padding: 4px;
  
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 4px;
  gap: 4px;
}

.topnav a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  
  padding: 0 14px;
  
  cursor: pointer;
  color: #f2f2f2;
  background-color: #444;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  border-radius: 4px;
  transition: background-color .1s;
}

.topnav a:hover, .dropdown-content a:hover {
  background-color: #545454;
}

.topnav a.active, .dropdown-content a.active {
  background-color: #6a6a6a;
}

.topnavbutton {
  height: 49px !important;
}

.topnavdisable {
  background-color: #3d3d3d !important;
  color: #666 !important;
  pointer-events: none;
}

.topnavdisable:hover {
  background-color: #3d3d3d !important;
  color: #666 !important;
  pointer-events: none;
}

.topnav-icon {
  display: none;
  
  justify-content: center;
  align-items: center;
  
  font-size: 32px;
  
  width: 43px;
  height: 43px;
  padding: 3px;
}

/* The dropdown container */
.dropdown {
  /* overflow: hidden; */
  position: relative;
}

/* Dropdown button */
.dropdown .dropbtn {
  font-size: 16rem;
  border: none;
  outline: none;
  color: white;
  padding: 14rem 16rem;
  background-color: inherit;
  font-family: inherit; /* Important for vertical align on mobile phones */
  margin: 0; /* Important for vertical align on mobile phones */
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0);
  /* box-shadow: 0rem 8rem 16rem 0rem rgba(0,0,0,0.2); */
  z-index: 1;
  
  top: 100%;
  left: 0;
}

.dropdown-content-flipped {
  left: auto;
  right: 0;
}

/* Links inside the dropdown */
.dropdown-content a {
  color: #f2f2f2;
  text-decoration: none;
  display: block;
  text-align: left;
  border-radius: 0rem;
  
  padding: 9px 14px;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-container {
  border-radius: 4px;
}

.dropdown-separator {
  border-top: 1px solid #666;
  height: 0rem;
  width: 100%;
}

.dropdown-separator-big {
  border-top: 3px solid #666;
  height: 0rem;
  width: 100%;
}

.textInput {
  max-width: 30px;
  background-color: #444;
  color: #fff;
  outline: 2rem solid #666;
  text-align: right;
  font-size: 16px;
  font-family: 'Bree5erif-Mono';

  position: relative;
  float: right;
  right: -5rem;
  top: -5rem;
}

.comparesourcecheckbox {
  -webkit-appearance: none;
  border-radius: 3rem;
  background-color: #888;
  cursor: pointer;
}

.comparesourcecheckbox:checked {
  background-color: #fff;
}

#homepageButton {
  font-weight: bold;
  /* text-decoration: underline; */
}

.dropdown-item {
  margin-left: 0rem;
  float: none;
  padding: 6rem 12rem 10rem;
  color: #f2f2f2;
  text-decoration: none;
  display: block;
  text-align: left;
  cursor: pointer;
  background-color: #444;
  font-size: 16px;
  transition: background-color .1s;
}

.dropdown-item:hover {
  background-color: #545454;
}

.not-dropdown-item {
  color: white !important;
  display: inline !important;
  background-color: transparent !important;
  text-align: left !important;
  padding: 0 !important;
  text-decoration: underline !important;
  font-size: 16px !important;
  margin-left: 0rem !important;
}

.dropdown-button {
  flex: 1;
  margin-top: 4rem;
  border-radius: 4rem;
}

.deletebutton {
  transition: background-color .3s !important;
}

.deletebutton:hover {
  background-color: #C50000 !important;
}

#shiftButton {
  min-width: 60px;
}

#countdownDisplay {
  font-size: 24px !important;
}

#maincontent {
  display: flex;
  justify-content: space-between;
  margin-left: 40rem;
  margin-right: 40rem;
  
  height: 43.6vw;
  max-height: calc(100vh - 50rem - 20rem);
  
  gap: 3vw;
}

#maptextcontainer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Bree-Regular';
  width: 100%;
}

#infosidebar {
  display: flex;
  flex-direction: column;
  min-width: min(26vw, calc(0.60 * calc(100vh - 50rem - 20rem))); 
  max-width: min(26vw, calc(0.60 * calc(100vh - 50rem - 20rem)));
}

#totalsPieChartContainer {
  position: relative;
  display: inline-block;
  
  vertical-align: top;
  margin-top: 15rem;
  margin-bottom: 15rem;
  
  user-select: none;
  -webkit-user-select: none;
  
  width: 100%;
  aspect-ratio: 1/1;
}

#secondarySidebarContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

#discordInviteContainer {
  display: inline-block;
  padding-top: 10px;
  user-select: none;
  -webkit-user-select: none;
  
  width: 100%;
  height: 50%;
  max-height: 110px;
}

.credits-icon {
  position: relative;
  top: 5rem;
  width: 19px;
  height: 19px;
}

#sliderDateDisplayContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  visibility: hidden;
  
  height: calc(calc(2 * var(--slider-height)) + 10rem);
}

.slidecontainer {
  width: 100%; /* Width of the outside container */
  height: var(--slider-height);
  position: relative;
}

/* The slider itself */
.slider {
  -webkit-appearance: none;  /* Override default CSS styles */
  appearance: none;
  height: var(--slider-height); /* Specified height */
  width: 100%;
  border-radius: 5rem;
  background: #777; /* Grey background */
  outline: none; /* Remove outline */
  opacity: 0.85; /* Set transparency (for mouse-over effects on hover) */
  -webkit-transition: .2s; /* 0.2 seconds transition on hover */
  transition: opacity .2s;
  
  margin: 0;
  padding: 0;
  position: absolute;
}

/* Mouse-over effects */
.slider:hover {
  opacity: 1; /* Fully shown on mouse-over */
}

/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  width: var(--slider-thumb-width); /* Set a specific slider handle width */
  height: var(--slider-height); /* Slider handle height */
  border-radius: 5rem;
  background: #fff; /* Grey background */
  cursor: pointer; /* Cursor on hover */
}

.slider::-moz-range-thumb {
  width: var(--slider-thumb-width); /* Set a specific slider handle width */
  height: var(--slider-height); /* Slider handle height */
  border-radius: 5rem;
  background: #fff; /* Grey background */
  cursor: pointer; /* Cursor on hover */
}

#totalsPieChart {
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 27.5%;
}

.ticks {
  display: flex;
  justify-content: space-between;
  margin: 0rem calc(calc(var(--slider-thumb-width) / 2) - calc(var(--slider-tick-width) / 2));
  pointer-events: none;
  width: calc(100% - var(--slider-thumb-width) + var(--slider-tick-width));
  
  position: absolute;
}

.tick {
  position: relative;
  display: flex;
  justify-content: center;
  width: var(--slider-tick-width);
  background: rgb(217, 217, 217);

  height: var(--slider-height);
}

.boxcontainer {
  display: block;
  vertical-align: top;
}

.box {
  border: 1rem solid gray;
  /* max-width: 200rem; */
  background-color: rgba(51, 51, 51, 0.9);
  color: white;
  padding-left: 10rem;
  padding-right: 10rem;
  border-radius: 5rem;
  font-size: 20rem;
  text-align: center;
}

.boxfixed {
  border: 1px solid gray;
  /* max-width: 200rem; */
  background-color: rgba(51, 51, 51, 0.9);
  color: white;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 5px;
  font-size: 20px;
  text-align: center;
}

.loader {
  --border-size: 8px;
  
  border: var(--border-size) solid #999;
  /* Grey */
  border-top: var(--border-size) solid #3498db;
  /* Blue */
  border-radius: 50%;
  aspect-ratio: 1/1;
  height: calc(100% - calc(2 * var(--border-size)));
  animation: spin 0.5s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.progress-loader {
  aspect-ratio: 1/1;
  height: 100%;
  display: inline-block;
  font-size: 12px;
}

.progress-loader > svg {
  overflow: visible;
}

#svgdata {
  transition: opacity 0.3s;
}

.chart-overlay-text {
  font-size: 45rem;
  font-family: 'Bree5erif-Mono';
  font-weight: bold;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.chart-overlay-shadow-small {
  text-shadow: 0 0 2rem #ffffff, 0 0 5rem #000000;
}

.chart-overlay-shadow-big {
  text-shadow: 0 0 2rem #ffffff, 0 0 9rem #000000;
}

.regionbox-text-shadow {
  text-shadow: 0 0 1.25rem #ffffff, 0 0 1.5rem #000000;
}

.date-display {
  display: inline-block;
  padding-left: 20rem;
  vertical-align: center;
  
  margin: 0;
  
  color: white;
  font-feature-settings: 'tnum' 1;
  font-size: calc(20rem * var(--slider-date-scale));
  
  user-select: none;
  -webkit-user-select: none;
}

.party-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.party-votes {
  font-weight: bold;
  font-size: 17px;
  line-height: 100%;
}

@container discord-invite-box (max-width: 280px) {
  #discordInfo {
    display: none !important;
  }
}

@media (max-width: 1575px) and (min-width: 1525px) {
  #countdown-seconds {
    display: none !important;
  }
  
  #countdownsDropdownContent {
    min-width: 275px !important;
  }
}

@media (max-width: 1525px) {
  #countdown-seconds, #countdown-minutes, #countdown-hours {
    display: none !important;
  }
  
  #countdownsDropdownContent {
    min-width: 150px !important;
    max-width: 150px !important;
  }
}

@media (max-width: 1425px) {
  .topnav-text {
    display: none;
  }
  
  .topnav-icon {
    display: flex;
  }
  
  .topnav-iconbutton {
    padding: 0 !important;
  }
  
  #sourceToggleButton .topnav-text {
    display: block;
  }
  
  #sourceToggleButton .topnav-icon {
    display: none;
  }
  
  #shiftButton {
    min-width: auto;
  }
}

@media (max-width: 1250px) {
  #countdownsContainer {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  #sourceToggleButton {
    min-width: auto !important;
  }
  
  #sourceToggleButton .topnav-text {
    display: none;
  }
  
  #sourceToggleButton .topnav-icon {
    display: flex;
  }
}

@media (max-aspect-ratio: 1.1/1) {
  #maincontent {
    flex-grow: 1;
    
    flex-direction: column;
  }
  
  #toggleHelpBoxButton {
    display: none;
  }
  
  #maptextcontainer {
    flex-grow: 1;
  }
  
  #infosidebar {
    flex-direction: row;
    justify-content: space-between;
    
    min-width: initial;
    max-width: initial;
    
    gap: 50rem;
  }
  
  #totalsPieChartContainer {
    width: 40%;
  }
  
  #secondarySidebarContainer {
    width: 49%;
  }
  
  #partyDropdownsBoxContainer {
    height: 40% !important;
  }
  
  :root {
    --slider-date-scale: 1.75;
  }
  
  @container discord-invite-box (max-width: 310px) {
    #discordInfo {
      display: none !important;
    }
  }
  
  #discordInviteContainer {
    height: 40%;
  }
}

@media (pointer:none), (pointer:coarse) {
  #maincontent {
    flex-grow: 0;
    height: calc(80vh - 70px);
  }
  
  :root {
    --slider-date-scale: 1.75;
  }
  
  #credits-container {
    display: none !important;
  }
  
  @media (max-aspect-ratio: 1.1/1) {
    :root {
      --slider-date-scale: 3;
    }
  }
}