@import 'icons.scss';
@import 'addform.scss';

$text-color: #98aab6;
$dark-border-color: #2b2b2b;

.popout.bda-qme-te-hidden {
  #bda-qem-twitch, #bda-qem-favourite {
    display: none;
  }
}
.popout.bda-qme-hidden.bda-qme-te-hidden {
  #bda-qem {
    display: none;
  }
  #bda-qem-line-container {
    border-radius: 5px;
  }
}

#bda-qem button {
  // border-top: 1px solid #efefef;
  box-shadow: #EFEFEF 1px 0 0 0;
}

#bda-qem-twitch,
#bda-qem-favourite {
  border-radius: unset;
}
#bda-qem-line {
  border-radius: 5px 0 0 0;
}

// Dark styling
// styling the emote menu so it looks consistent across the tabs
// applies only when BetterDiscord Dark mode is enabled
.bda-dark {
  .emoji-picker {
    border-color: $dark-border-color;
    .search-bar {
      border-radius: 0 4px 4px 0px;
    }
  }

  #bda-qem {
    border-bottom: 1px solid $dark-border-color !important;
    button {
      // border-top: unset;
      box-shadow: $dark-border-color 1px 0 0 0;
    }
  }

  #bda-qem-line-container {
    background-color: #353535;
    border-color: $dark-border-color;

    .scroller::-webkit-scrollbar,
    .scroller::-webkit-scrollbar-track,
    .scroller::-webkit-scrollbar-track-piece {
      background-color: #303030 !important;
      border-color: #303030 !important;
    }

    .scroller::-webkit-scrollbar-thumb {
      border-color: #202020 !important;
      background-color: #202020 !important;
    }

    .categories-container .categories-wrapper {
      background-color: #353535;
    }
    .preview-container .preview-wrapper {
      background-color: #353535;
      border-color: $dark-border-color;
    }

    .confirm {
      background-color: rgba(35, 35, 35, 0.8);
    }

    .add-form {
      background-color: #353535;
    }
    .add-pack {
      opacity: 1;
    }
  }
}

// have a full 1px border if the Line tab is the only one enabled
.popout.bda-qme-hidden.bda-qme-te-hidden #bda-qem-line-container {
  border-top-width: 1px; }

#bda-qem-line-container {
  // width: 344px;
  // height: 326px;
  border-radius: 0 0 5px 5px;
  font-weight: 800;
  color: $text-color;
  background-color: #fff;
  border-width: 0px 1px 1px 1px;
  border-style: solid;
  border-color: hsla(0,0%,75%,.2);

  // preventing overflow
  .scroller-wrap {
    height: 100%;
  }

  // padding the inner container
  .emote-menu-inner {
    padding: 5px 15px 48px 15px;
  }

  // header for a sticker pack
  .line-pack-header {
    display: flex;
    color: $text-color;
    height: 12px;
    font-size: 12px;
    padding: 12px 0 12px 0;
    text-transform: uppercase;
  }

  // sizing stickers up from default 30x30
  .emote-container {
    width: 71px;
    height: 71px;
  }

  // preview stylesheet
  .preview-container .preview-wrapper {
    position: absolute;
    width: 256px;
    height: calc(var(--bd-les-height) + var(--bd-les-offset));
    // height: 356px;
    background-color: #fff;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(191, 191, 191, 0.2);
    border-radius: 5px;
    box-shadow: -10px 0px 80px 0px rgba(0, 0, 0, 0.2);
    transform: translateX(-258px) translateY(calc(0px - var(--bd-les-height) - var(--bd-les-offset) - var(--bd-les-border-offset))) translateZ(0px);
    transition: all .15s ease-in-out .15s;
  }

  // categories stylesheet
  .categories-container {
    position: absolute;
    width: calc(var(--bd-les-width) - 15px);
    // width: 331px;
    bottom: 1px;
    overflow: hidden;
    z-index: 1;
    margin-top: -44px;
    background-color: inherit;
    border-top: 1px solid rgba(0,0,0,.1);
    .categories-wrapper {
      clear: right;
      overflow: hidden;
      white-space: nowrap;
      background-color: #fff;

      .item:first-of-type {
        margin-left: 15px;
        margin-right: 0px;
      }

      .item:nth-child(2) {
        margin-left: 0px;
      }

      .item:hover {
        filter: grayscale(0%);
      }

      .item {
        display: inline-block;
        box-sizing: border-box;
        cursor: pointer;
        width: 28px;
        height: 44px;
        margin-right: 4px;
        margin-left: 2.5px;
        background-position: center;
        background-repeat: no-repeat;
        background-size: 32px 32px;
        border-bottom: 3px solid transparent;
        filter: grayscale(100%);
        transition: filter .1s ease-in-out;
      }
    }
  }



  .visible {
    opacity: 1 !important;
  }

  .line-pack {
    input {
      width: 100%;
    }

    .line-editbar:hover {
      opacity: 1;
    }

    .line-editbar {
      float: right;
      display: flex;
      padding-top: 10px;
      opacity: 0;
      transition: opacity .1s ease-in-out;

      .item {
        display: inline-block;
        width: 22px;
        height: 22px;
        opacity: 0.5;
        transition: opacity .1s ease-in-out .05s;
      }
      .item:hover {
        opacity: 1;
      }
    }
  }

  input:focus {
    box-shadow: 0px 2px 0px 0px;
    outline: none;
  }

  input {
    color: $text-color;
    background-color: inherit;
    border: none;
    margin: 0;
    height: 12px;
    padding: 0px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }


  .box {
     width: 100%;
     color: $text-color;
     text-align: center;
     transform: translateY(250%);
   }

  .confirm {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    transition: opacity .1s ease-in-out .05s;
    z-index: 10;

    .yes, .no {
      padding: 10px;
      text-transform: uppercase;
      cursor: pointer;
      color: rgba(152, 170, 182, 0.8);
      transition: color .1s ease-in-out .05s;
    }

    .yes:hover {
      color: #ad0000
    }

    .no:hover {
      color: rgb(152, 170, 182);
    }
  }


  .categories-container .categories-wrapper .item.add-pack-button { filter: unset; }
  // .categories-container .categories-wrapper .item.add-pack-button:hover { filter: grayscale(100%); }
  .add-pack-button {
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 5px;
  }
  .add-pack-button > svg {
    position: absolute;
    top: 13px;
  }
  .add-pack-button > svg > path {
    opacity: 0.5;
    fill: #8c8c8c;
  }
  .add-pack-button > svg > path:hover {
    opacity: 1;
  }
  

}
