@use 'fonts';
@use 'responsive';

:root {
  --clr-primary: #ffc014;
  --clr-secondary: #2f2f2f;

  --clr-bg: #4d4d4d;
  --clr-bg2: #1b1b1b;
  --clr-bg3: #1d1d1d;
  --clr-view-bg: #1a1a1a;
  --clr-bg-light: #2b2b2b;

  --clr-tile: #181818;

  --clr-accent: #1085b3;
  --clr-accent2: #ff3d5d;

  --clr-skr: #ff5100;
  --clr-twr: #ee503e;
  --clr-tn: #cb4dcf;
  --clr-pn: #ffd000;

  --clr-error: #fa3636;
  --clr-warning: #ffe15b;

  --clr-donator: #f7a4ff;

  --clr-success: springgreen;

  --no-scroll-padding: 17px;
  --max-container-width: 1700px;

  font-size: 16px;
}

::-webkit-scrollbar {
  // width: var(--no-scroll-padding);
  // height: var(--no-scroll-padding);

  &-track {
    background-color: #333;
  }

  &-thumb {
    background-color: #666;
  }

  &-corner {
    background-color: #333;
  }
}

body {
  background: var(--clr-bg);
  color-scheme: dark;

  margin: 0;
  padding: 0;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;

  overflow-y: scroll;
  overflow-x: hidden;
  position: relative;

  font-size: 16px;

  @include responsive.smallScreen {
    font-size: calc(0.65rem + 0.85vw);
  }

  @include responsive.screenLandscape {
    font-size: calc(0.45rem + 0.8vw);
  }

  &.no-scroll {
    overflow-y: hidden;
    padding-right: var(--no-scroll-padding);

    @include responsive.smallScreen {
      padding: 0;
    }
  }
}

button,
input,
select {
  border: none;
  font-family: 'Quicksand', sans-serif;
  font-size: 1em;
}

input,
select {
  background: none;
  color: white;
  font-size: 1em;

  background-color: #333;
  padding: 0.15em 0.5em;

  outline: none;

  &::placeholder {
    color: #cfcfcf;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;

  -webkit-tap-highlight-color: transparent;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 1px solid var(--clr-primary);
}

.title {
  color: var(--clr-primary);
  font-weight: 600;

  padding: 0.35em 0;
}

.active-indicator {
  width: 7px;
  height: 7px;
  background-color: lightgreen;
  border-radius: 50%;
}

a {
  text-decoration: none;
  color: inherit;
}

a.a-row {
  display: table-row;
}

a:focus-visible {
  outline: 1px solid var(--clr-primary);
}

.route-link {
  margin: 0 0.2em;
  transition: color 100ms;

  &-active,
  &[data-active='true'] {
    color: var(--clr-primary);
    font-weight: bold;
  }

  &:hover {
    color: var(--clr-primary);
  }
}

ul {
  padding: 0;
  list-style: none;
}

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

  width: 100%;

  &-spaced {
    justify-content: space-between;
  }

  &-column {
    flex-direction: column;
  }
}

.text {
  &--primary {
    color: var(--clr-primary);
  }

  &--grayed {
    color: #ccc;
  }

  &--error {
    color: var(--clr-error);
  }

  &--donator {
    color: var(--clr-donator);
    color: transparent;

    background: var(--clr-donator);
    background: linear-gradient(90deg, #ff88db 30%, #ffffff 70%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: #f050ff 0 0 10px;
  }

  &--creator {
    color: var(--clr-primary);
    color: transparent;

    background: var(--clr-primary);
    background: linear-gradient(90deg, gold 30%, #ffffff 70%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: gold 0 0 10px;
  }

  &--discord {
    color: var(--clr-donator);
    color: transparent;

    background: var(--clr-donator);
    background: linear-gradient(90deg, #7fb6ff 0%, #60ecff 70%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: #88ddff 0 0 10px;
  }
}

.font {
  &--italic {
    font-style: italic;
  }
}

button,
a.a-button {
  cursor: pointer;
  color: white;
  background: none;
  border-radius: 0.25em;
  text-decoration: none;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;

  padding: 0.25em 0.5em;

  transition: all 100ms ease;

  &[data-disabled='true'] {
    user-select: none;
    pointer-events: none;
    opacity: 0.7;
  }

  &.btn--filled {
    background-color: #1a1a1a;

    &:hover {
      background-color: #2a2a2a;
    }
  }

  &.btn--action {
    background-color: #424242;
    border-radius: 0.25em;
    font-weight: bold;

    &:hover {
      background-color: #505050;
    }

    &:disabled {
      opacity: 0.75;
    }
  }

  &.btn--option {
    color: white;
    background-color: #333;

    &.checked {
      color: var(--clr-primary);
      font-weight: bold;

      background-color: #3c3c3c;
    }

    &:hover {
      background-color: #555;
    }
  }

  &.btn--image {
    font-weight: bold;
    padding: 0.35em 0.75em;

    img {
      height: 1.35em;
      vertical-align: middle;
    }
  }
}

// Basic tooltip
[data-tooltip] {
  cursor: help;
  line-height: initial;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  position: absolute;
  transform: translate(0, -50%);

  content: attr(data-tooltip);
  color: white;
  background-color: #333;
  box-shadow: 0 0 5px 2px #aaa;
  border-radius: 0.5em;
  padding: 0.5em;
  margin: 0 0.5em;
  max-width: 300px;
  z-index: 100;
}

.tooltip-help {
  cursor: help;
}

@include responsive.smallScreen {
  [data-tooltip]:hover::after,
  [data-tooltip]:focus::after {
    transform: translate(-50%, 2em);
    left: 50%;
    width: 100%;
  }
}

.g-separator {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #aaa;
  margin: 0.5em 0;
}

.g-checkbox {
  position: relative;
  display: inline-block;

  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;

  display: flex;
  justify-content: center;
  align-items: center;

  input {
    position: absolute;
    width: 1px;
    height: 1px;
  }
}
