* {
  box-sizing: border-box;
  user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  outline: none;
}
body {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
ul,
li {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--display-font);
}

/* firefox only hack */
@-moz-document url-prefix() {
  :root {
    scrollbar-color: rgba(39, 39, 39, 0.12) transparent;
    scrollbar-width: thin !important;
  }
}

::-webkit-scrollbar {
  width: 4px !important;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--inner-border-radius);
  z-index: 999;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(3, 3, 3, 0.66);
}

a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
}

.full {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.resetb {
  border: none;
  font-size: 1em;
  background: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  color: var(--text-primary);
}

.sub {
  font-weight: 400;
  opacity: 0.66;
  color: var(--text-primary);
}

.basicbutton {
  background-color: var(--c-dark-bg);
  color: var(--text-on-dark);
  border: 1px solid transparent;
  padding: 0.5em 1em;
  border-radius: var(--inner-border-radius);
  font-family: var(--display-font);
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    opacity 0.3s ease;
  font-size: 1em;
}

.basicbutton:hover {
  background-color: var(--c-bright-bg);
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.basicbutton:disabled {
  opacity: 0.33;
}

.basicbutton.small {
  font-size: 0.8em;
}

.space-top {
  margin-top: 1em;
}
.space-bottom {
  margin-bottom: 1em;
}

button {
  font-family: var(--display-font);
}
button.withicon {
  display: flex;
  align-items: center;
  padding: 0.5em 1em 0.5em 0.5em;
}

button.withicon .icon {
  flex-shrink: 0;
}

.pbutton {
  font-size: 0.9em;
  font-family: var(--primary-font);
  gap: 0.75em;
  font-weight: 400;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-block;
  position: relative;
  padding: 0.25em 0.5em !important;
}
.pbutton .icon {
  opacity: 0.66;
  font-size: 1em;
  transition: opacity var(--spd-insp) ease;
}
.pbutton:hover .icon {
  opacity: 1;
}

button.main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-weight: 700;
  filter: invert();
}
button.main:hover {
  filter: none;
}

html .icon,
html .material-symbols-outlined {
  font-display: block;
}

/* --- switch */

.switch {
  display: inline-block;
}
.switch-check {
  position: relative;
  display: flex;
  align-items: center;
}

/* Hide default HTML checkbox */
.switch-check input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.switch-slider {
  position: relative;
  cursor: pointer;
  display: block;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 4em;
  height: 2em;
  background-color: #ccc;
  border-radius: 3em;
  transition: all var(--spd-insp) ease;
}

.switch-slider:before {
  position: absolute;
  content: '';
  background-color: white;
  transition: all var(--spd-insp) ease;
  border-radius: 50%;

  height: 1.5em;
  width: 1.5em;
  left: 0;
  bottom: 50%;
  transform: translateY(50%) translateX(0.25em);
}

input:checked + .switch-slider {
  background-color: var(--power-primary-color);
}

input:checked + .switch-slider:before {
  transform: translateY(50%) translateX(calc(4em - (1.5em / 2) - 50% - 0.25em));
}

.switch-label {
  margin: 0 0 0 1em;
}

.checker {
  --checker-dark: #13223e29;
  --checker-light: #f6f6f6;
  --checker-size: 4em;
  background-image:
    linear-gradient(45deg, var(--checker-dark) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-dark) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-dark) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-dark) 75%),
    linear-gradient(0deg, var(--checker-light), var(--checker-light));
  background-size: var(--checker-size) var(--checker-size);
  background-position:
    0 0,
    0 calc(var(--checker-size) / 2),
    calc(var(--checker-size) / 2) calc(-1 * var(--checker-size) / 2),
    calc(-1 * var(--checker-size) / 2) 0px;
}

.userIcon {
  width: 2.66em;
  aspect-ratio: 1;
  padding: 0;
  object-fit: cover;
  border-radius: 100%;
  position: relative;
  box-shadow: inset 0 0 2px 0px rgba(0, 0, 0, 0.25);
  z-index: 0;
}

.userIcon.noThumb {
  --h: 69;
  --s: 100%;
  --l: 49%;
  --c: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  background-color: hsl(var(--h), var(--s), var(--l));
  color: hsl(0, 0%, calc(var(--c) * 100%));
  aspect-ratio: 1;
}

.rotate-loop {
  animation: rotate-loop 1.5s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite;
}

@keyframes rotate-loop {
  from {
    transform: rotate3d(0, 0, 1, 0deg);
  }
  to {
    transform: rotate3d(0, 0, 1, 360deg);
  }
}
