@import "settings";
@import "mixins";

@import "animations";
@import "button";
@import "colour";
@import "common";
@import "flex";
@import "fonts";
@import "half-screen";
@import "margin";
@import "material";
@import "opacity";
@import "padding";
@import "position";
@import "size";
@import "table";
@import "text";
@import "toggle";
@import "websocket-state";

// ---------------------------------------------------------
// MAIN CSS
// ---------------------------------------------------------

* {
  box-sizing: border-box;
  user-select: text;
}

*, :focus {
  outline: 0 !important;
}

html {
  background-color: $bg;
  scroll-behavior: smooth;
  transition: background-color .4s;
}

body {
  -webkit-overflow-scrolling: touch;
  color: $color;
  font-family: $font-family;
  font-size: $font-size;
  height: 100vh;
  margin: 0;
  overflow-y: auto;
  width: 100%;

  &[data-menu="yes"] {
    padding-left: $mm-width;
  }

}

// SCROLLBAR
::-webkit-scrollbar {
  height: $scrollbar-width;
  width: $scrollbar-width;
}

::-webkit-scrollbar-track {
  background: none;
}

::-webkit-scrollbar-thumb {
  background-color: $color;
}

::-webkit-scrollbar-thumb:hover {
  // background-color: $primary-op-min;
}

::-webkit-scrollbar-corner {
  background: none;
}

// SCROLLBAR HORIZONTAL
::-webkit-scrollbar:horizontal {
  height: $scrollbar-width;
}

// USER SELECTION
::selection {
  background-color: $primary;
  color: white;
  fill: $bg; // FOR SVG TEXT
}

// INPUTS
input, textarea {
  background: inherit;
  border: none;
  color: inherit;
  font-family: $font, Arial, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  padding: 4px;
  text-align: left;
  width: 100%;
}

input:focus {
  outline: none;
}

input.disabled {
  border-bottom: 1px solid $color-op-max;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

input[type="search"]::-webkit-search-cancel-button {
  filter: hue-rotate(135deg) saturate(400);
}

textarea {
  resize: none;
}

// AUTOCOMPLETE
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border: none;
  -webkit-text-fill-color: $color;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 0s ease-in-out 5000000s !important;
}

// LINK
.link {
  cursor: pointer;
  text-decoration: underline;
  transition: color .2s;

  &:hover {
    color: $primary;
  }
}

a {
  @extend .link;
  color: inherit;
}

// TITLES
h1 {
  color: inherit;
  font-family: $font-accent-family;
  font-size: 34px;
  font-weight: normal;
  line-height: 40px;
  margin: 0;
  width: 100%;
}

h2 {
  color: $primary;
  display: block;
  font-family: $font-accent-family;
  font-size: 184%;
  font-weight: normal;
  margin: 0;
  width: 100%;
}

h3 {
  display: inline;
  font-size: 134%;
  margin: 0;
  padding-right: 2px;
  width: 100%;
}

h4 {
  display: inline;
  font-size: 124%;
  margin: 0;
  width: 100%;
}

h5 {
  display: inline;
  font-size: 110%;
  font-weight: bold;
  margin: 0;
  width: 100%;
}

