// app global css in SCSS form

@import './app/customColors.scss';

* {
  letter-spacing: 0.025em;

  /* width */
  ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  /* Track */
  ::-webkit-scrollbar-track {
    background: var(--q-color-dark);
  }

  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: lighten($dark, 40);
    border-radius: 5px;
  }

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: lighten($dark, 60);
  }
}

html {
  background-color: #fff;
}

html body {
  &.q-body--prevent-scroll {
    overflow-y: hidden;
    position: relative !important;
    padding-right: 5px;
  }
}

body {
  background-color: rgba($primary, 0.02);
  overflow-y: scroll;
  overflow-x: hidden;
  top: 0 !important;
  color: darken($dark, 12.5);

  /* WebKit/Blink Browsers */
  ::selection {
    color: lighten($primary, 25);
    background: lighten($secondary, 10);
  }

  /* Gecko Browsers */
  ::-moz-selection {
    color: lighten($primary, 25);
    background: lighten($secondary, 10);
  }

  &.body--dark {
    background: #303742;

    /* WebKit/Blink Browsers */
    ::selection {
      color: lighten($primary, 25);
      background: lighten($secondary, 7);
    }

    /* Gecko Browsers */
    ::-moz-selection {
      color: lighten($primary, 25);
      background: lighten($secondary, 7);
    }

    .q-editor {
      border: none !important;
      background-color: #303742;
      color: #dcdcdc;
    }

    .q-field__control {
      background-color: transparent;
    }

    .q-markdown {
      color: #d4d0c9;
    }

    .existingDocumentSelect,
    .newDocumentSelect,
    .listAtributeSelect {
      .q-field__input,
      .q-icon,
      .q-field__label,
      .q-field__native span {
        color: #d4d0c9 !important;
      }
    }

    .q-editor__content {
      background-color: #4c515a;
      box-shadow: none;
    }

    .q-editor__toolbars-container {
      background-color: rgba(#000, 0.3);
    }
  }
}

a {
  color: var(--q-color-primary);
}

.q-editor {
  background-color: rgba(250, 250, 250, 1);
  padding-bottom: 15px;
}

.q-notification__caption {
  opacity: 1;
}

.q-window {
  -webkit-app-region: no-drag;
  border: none !important;
  z-index: 99999 !important;
}

.advSearchWindow {
  .q-markdown {
    & > ul {
      margin-top: 0;
    }

    ul {
      padding-left: 20px;
    }
  }
}

.q-notification.bg-info {
  max-width: 550px;
  border: 2px solid var(--q-color-dark);
  color: var(--q-color-dark);

  i {
    color: var(--q-color-dark);
  }
}

.fieldWysiwyg,
.q-editor__content,
.fieldWysiwygTitle,
.q-editor__toolbars-container {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.fieldWysiwyg {
  font-size: 16px;
  text-align: justify;

  > div {
    margin: 12.5px 0;
  }
}

.q-editor__content {
  padding: 35px 50px;
  line-height: 1.7;
  background-color: #fff;
  box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  font-size: 16px;
  text-align: justify;

  * {
    letter-spacing: 0.02em;
  }

  > div {
    margin: 12.5px 0;
  }
}

.q-editor__toolbars-container {
  padding: 5px;
  max-width: 1200px;
  margin-bottom: 10px;
  margin-top: 10px;
  background-color: rgba($dark, 0.05);
}

.q-editor.fullscreen {
  top: 40px !important;
  height: calc(100vh - 40px) !important;
  padding: 10px 0 15px;

  .q-editor__content {
    padding: 35px 60px 50vh;
  }
}

.q-editor__toolbar {
  border: none;
}

.q-item {
  &.isMinor {
    filter: grayscale(100) brightness(0.7);
  }

  &.hasTextShadow {
    $shadowColorOutline: #000;
    $shadowColorSurround: #000;

    filter: drop-shadow(0 0 4px #000);
    font-weight: 500;
    text-shadow:
      -2px -2px 0 $shadowColorSurround,
      2px -2px 0 $shadowColorSurround,
      -2px 2px 0 $shadowColorSurround,
      2px 2px 0 $shadowColorSurround,
      -1px -1px 0 $shadowColorOutline,
      1px -1px 0 $shadowColorOutline,
      -1px 1px 0 $shadowColorOutline,
      1px 1px 0 $shadowColorOutline;
  }
}

.q-notification__avatar {
  height: 135px;
  width: 135px;
  margin-right: 30px;
  flex-shrink: 0;
  border-radius: 0;
  margin-top: 15px;
  margin-bottom: 15px;

  img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
  }
}

.isDeadIndicator {
  margin-right: 5px;
  font-weight: 600;
}

.isDead {
  text-decoration: line-through;
  text-decoration-color: #fff;
} 

.q-icon::after,
.q-icon::before {
  backface-visibility: hidden;
}

.grow-0 {
  flex-grow: 0;
}

.grow-1 {
  flex-grow: 1;
}

.q-notification__message {
  font-size: 16px;
  font-weight: 500;
}

.q-loading::before {
  opacity: 1 !important;
}

.q-drawer-container * {
  user-select: none !important;
}

.q-toggle__inner {
  width: 100%;
  max-width: 150px;
}

.q-toggle__thumb {
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.q-toggle__inner--truthy .q-toggle__thumb {
  left: calc(100% - 30px);
}

.existingDocumentPopup,
.newDocumentPopup {
  .q-checkbox__bg {
    border-color: #d4d0c9 !important;
    background: transparent !important;
  }
}

.tagSelect,
.singleSelect,
.multiSelect,
.singleRelashionshipSelect,
.multiRelashionshipSelect,
.existingDocumentSelect,
.newDocumentSelect,
.listAtributeSelect {
  &.q-field--dark .q-field__control::before {
    border: 1px solid rgba(0, 0, 0, 0.24);
  }

  .q-field__input,
  .q-field__label,
  .q-icon,
  .q-field__native span {
    color: #000 !important;
  }
}

.tagSelect,
.singleSelect,
.multiSelect,
.listAtributeSelect,
.singleRelashionshipSelect,
.multiRelashionshipSelect {
  .q-chip {
    height: inherit;

    &--dense {
      padding: 0.2em 0.5em;
    }

    &__content {
      white-space: normal;
      flex-wrap: wrap;
    }

    &__icon--remove {
      margin-right: -0.2em;
      margin-left: 0.2em;
    }
  }
}

.existingDocumentSelect,
.newDocumentSelect {
  .q-field__input,
  .q-icon,
  .q-field__native span {
    color: #d4d0c9 !important;
  }
}

.q-menu .q-item {
  transition: none !important;
}

.q-field__control {
  background-color: #fff;
}

.q-position-engine {
  overflow-y: auto !important;
  -webkit-app-region: no-drag;
  z-index: 999999;
}

.q-menu {
  z-index: 99999999 !important;
  background-color: $dark;
  color: $accent;
}

.text-underline {
  text-decoration: underline;
}

.q-chip--outline {
  border-style: outset !important;
}

.q-focus-helper {
  background-color: map-get($customColors, 'gunmetal-bright') !important;
}

.q-chip.noBounce {
  padding-bottom: 6px;
  padding-left: 11px;
  padding-right: 11px;
  padding-top: 6px;
}

body .q-item--active:not(.noHigh) {
  color: inherit;

  &::after {
    content: "";
    background-color: #d7ac47;
    left: 5px;
    width: 3px;
    top: 10px;
    border-radius: 3px;
    position: absolute;
    bottom: 10px;
  }

  &::before {
    content: "";
    background-color: #d7ac47;
    right: 5px;
    width: 3px;
    top: 10px;
    border-radius: 3px;
    position: absolute;
    bottom: 10px;
  }
}

body .q-tooltip {
  background-color: $accent;
  color: $dark;
  font-size: 13px;
  font-weight: 600;
}

.q-markdown {
  line-height: 1.75;

  .q-markdown--token {
    font-weight: 600;
    padding: 0 5px;
    background-color: $accent !important;
    color: $dark !important;
  }

  strong {
    font-weight: 500;
  }

  hr {
    opacity: 0.5;
    margin: 30px 0;
    border-radius: 5px;
  }

  ul {
    margin-bottom: 3px;
  }

  li {
    margin-top: 5px;
    margin-bottom: 5px;
  }
}

.q-splitter__before {
  z-index: 2;
}

.q-splitter__after {
  z-index: 1;
}

.q-splitter__separator {
  z-index: 3;
}

.discordButton {
  color: #fff !important;
  background-color: #7289da !important;
  font-size: 16px;
  line-height: 24px;
  height: 44px;
  min-height: 44px;
  transition: background-color 0.17s ease, color 0.17s ease;
  position: relative;
  display: flex;
  cursor: pointer;
  align-items: center;
  box-sizing: border-box;
  background: none;
  border: none;
  margin: auto;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
  padding: 2px 16px 2px 46px;
  user-select: none;
  background-image: url('../assets/discordLogo.svg');
  background-position: 5px 6px;
  background-repeat: no-repeat;
  background-size: 36px;

  &:hover {
    background-color: #677bc4 !important;
  }

  &:active {
    background-color: #5b6eae !important;
  }
}

.patreonButton {
  align-items: center;
  backface-visibility: hidden;
  background-color: rgb(255, 66, 77);
  border-radius: 9999px;
  border: 1px solid rgb(255, 66, 77);
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-weight: 500;
  justify-content: center;
  padding: 12.5px 24px 12.5px 60px;
  position: relative;
  text-align: center;
  transition: all 300ms cubic-bezier(0.19, 1, 0.22, 1) 0s;
  user-select: none;
  width: unset;
  color: rgb(255, 255, 255) !important;
  font-size: 16px !important;
  background-image: url('../assets/Digital-Patreon-Logo_White.png');
  background-position: 25px 12px;
  background-repeat: no-repeat;
  background-size: 26px;
}
