@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap");

/* latin */
@font-face {
  font-family: "Rajdhani-semibold";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/rajdhani/v15/LDI2apCSOBg7S-QT7pbYF_Oreec.woff2)
    format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* Global */
:root {
  --main-color: #f56c00;
  --second-color: #00d9f5;
  --backgr-color: #1a1a1a;
  --elev-backgr-color: #333333;
  --elev-2-backgr-color: #4d4d4d;
  --red-color: #de4b18;
  --glass-color: #a6a6a6;
  --green-color: #64fa45;
}
.logofont {
  font-family: "Rajdhani-semibold", sans-serif;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: white;
}
html,
body {
  background-color: var(--backgr-color);
}
body {
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
}

/* Login / Logo */
.login > h1 {
  font-family: "Rajdhani-semibold", system-ui;
  text-align: center;
  color: white;
  font-size: 1.8rem;
  line-height: 0.8;
  margin: 0;
}
.login > h1::first-letter {
  color: var(--main-color);
  font-size: 6.8rem;
}
.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.1rem;
  width: 250px;
  right: 50%;
  bottom: 50%;
  transform: translate(50%, 50%);
  position: absolute;
  background-color: var(--backgr-color);
}
.loading {
  -webkit-animation: fade 1.5s linear infinite;
  animation: fade 1.5s linear infinite;
}
@keyframes fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@-webkit-keyframes fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Shortcuts */
.hl {
  color: var(--main-color) !important;
}
.hlred {
  color: var(--red-color) !important;
}
.hlblue {
  color: var(--second-color) !important;
}
.bold {
  font-weight: bold !important;
}
.nobold {
  font-weight: normal !important;
}
.df {
  display: flex;
}
.df.aic {
  align-items: center;
}
.textbg {
  padding: 0 2px;
  border-radius: 3px;
}
.textbg.red {
  padding: 0 2px;
  border-radius: 3px;
  background-color: var(--red-color);
}
.pointer {
  cursor: pointer;
}
:disabled,
.disabled {
  opacity: 0.6;
  cursor: default !important;
}

/* Button */
button {
  width: -moz-fit-content;
  width: fit-content;
  outline: none;
  cursor: pointer;
  display: block;
  font-size: 1.1rem;
  font-weight: bolder;
  color: var(--backgr-color);
  padding: 4px 15px;
  border-radius: 3px;
  border: 0;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, filter 0.2s, opacity 0.2s;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:not(:disabled):hover,
button:not(:disabled):focus-visible {
  filter: brightness(80%);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--elev-backgr-color);
  border-radius: 3px;
  margin: 5px;
}
::-webkit-scrollbar-thumb {
  background: var(--elev-2-backgr-color);
  border-radius: 3px;
}
::-webkit-scrollbar-corner {
  background: var(--backgr-color);
}

/* svelte-select */
div[slot="empty"] {
  text-align: center;
  color: white;
  padding: 10px 5px;
}
.value-container {
  color: white;
  padding: 0 !important;
}
.value-container .value {
  font-weight: bold;
}
.svelte-select input {
  cursor: text !important;
}
.svelte-select .item:not(.not-selectable) {
  cursor: pointer !important;
}
table .svelte-select,
table {
  --height: 22px;
  --clear-select-width: 20px;
}
.svelte-select .clear-select {
  justify-content: flex-end !important;
}
.svelte-select {
  transition: background-color 0.2s;
  --item-padding: 0 5px 0 10px;
  --group-item-padding-left: 20px;
  --height: 30px;
  --clearSelectBottom: 0;
  --clearSelectTop: 0;
  --background: var(--elev-backgr-color);
  --list-background: var(--elev-backgr-color);
  --item-color: white;
  --selected-item-color: white;
  --item-hover-color: white;
  --clear-icon-color: white;
  --chevron-color: white;
  --chevron-height: 5px;
  --chevron-width: 20px;
  --border-radius: 3px;
  --list-border-radius: 3px;
  --border: none;
  --border-focused: none;
  --border-hover: none;
  --list-empty-padding: 16px;
  --list-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.4);
  --item-hover-bg: var(--glass-color);
  --item-is-active-bg: var(--main-color);
  --disabled-background: var(--elev-backgr-color);
  --list-z-index: 11;
  --font-size: none;
  --padding: 0 10px;
}
.svelte-select-list .item {
  text-align: left;
}

/* Table */

.topbar > div {
  display: flex;
  align-items: flex-end;
}

.table {
  border-collapse: collapse;
  color: white;
  margin: auto;
  display: block;
  max-width: calc(100vw - 30px);
}
.table tbody {
  overflow: auto;
  min-height: 60px;
  height: max-content;
  display: block;
  box-sizing: border-box;
  white-space: nowrap;
}
.table thead {
  overflow: hidden;
  display: block;
  padding-right: 10px;
}
.table tr {
  display: table;
  width: 10px;
  table-layout: fixed;
}
.table > :not(caption) > * > * {
  padding: 4px;
}
.table tbody tr:nth-child(even):not(:nth-last-child(2)) {
  border-bottom: solid 1px var(--elev-2-backgr-color);
}
tr {
  transition: background-color 0.2s;
}
thead > tr {
  background-color: unset !important;
}
th input,
td input {
  height: var(--height);
  padding: 0px 5px;
}
th {
  color: var(--main-color);
  font-weight: bolder;
}
th > select,
td > select {
  height: var(--height);
  width: 100%;
}

/* Clicable <span> elements such as icons */
span[tabindex="0"]:hover[data-tooltip-green],
span[tabindex="0"]:focus-visible[data-tooltip-green] {
  color: limegreen !important;
}
span[tabindex="0"] {
  cursor: pointer;
  outline: none;
  transition: color 0.2s, opacity 0.2s;
}

/* HTML <input>s */
input,
textarea {
  width: -webkit-fill-available;
  font-size: 1rem;
  color: white;
  height: 30px;
  box-sizing: border-box;
  padding: 3px 7px;
  border-radius: 3px;
  background-color: var(--elev-backgr-color);
  outline: none;
  border: 0;
  transition: background-color 0.2s;
  white-space: pre;
  font-family: inherit;
}
textarea {
  max-height: 100px;
  max-width: 400px;
  min-width: 130px;
  min-height: 20px;
}

/* HTML <select>s */
select {
  height: 30px;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  color: white;
  box-sizing: border-box;
  border: 0px solid #ccc;
  border-radius: 3px;
  background-color: var(--elev-backgr-color);
  transition: color 0.2s, background-color 0.2s, opacity 0.2s;
}

/* Popups / Modals */
.popupContent h3 {
  margin: 0 1.5em 5px 0;
  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;
}
.popupContent h4 {
  margin: 0 0 5px 5px;
  font-weight: lighter;
}
