// Set default style
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

*,
::after,
::before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  -webkit-font-smoothing: antialiased;
  backface-visibility: none;
  -moz-osx-font-smoothing: grayscale;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  height: 100%;
  width: 100%;
}

i {
  cursor: pointer;
}

i:hover {
  opacity: 0.8;
}

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

p {
  font-weight: bold;
}

.info {
  background-color: $color-special !important;
}

.success {
  background-color: $color-active !important;
}

.warning {
  background-color: $color-warn !important;
}

.theme {
  background-color: $color-theme !important;
}

.danger {
  background-color: $color-error !important;
}

body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) input:focus,
body:not(.user-is-tabbing) select:focus,
body:not(.user-is-tabbing) textarea:focus {
  outline: none;
}

.fo-button {
  border: none;
  background-color: transparent;
  padding: 0;
  color: inherit;
  text-align: inherit;
  font-size: 100%;
  font-family: inherit;
  cursor: default;
  line-height: inherit;
  overflow: hidden;

  &.overflow {
    overflow: visible !important;
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.list-item {
  display: inline-block;
  margin-right: 10px;
}
.list-enter-active,
.list-leave-active {
  transition: all 0.5s;
}
.list-enter,
.list-leave-to {
  opacity: 0;
  transform: translateY(30px);
}

// Main style

.app-container,
.fo-browser {
  height: 100%;
  width: 100%;
  display: flex;

  // Place dark things

  &.light {
    .fo-svg-fill-dark {
      fill: black !important;
    }
  }

  &.dark {
    color: white !important;

    .lazy {
      background: #121214 !important;
    }

    .features {
      background: #17171b !important;
      a {
        color: white !important;
      }
    }

    .features-header {
      border: 0 !important;
    }

    .features-footer {
      background: $theme-dark !important;
    }

    .content {
      background: $theme-dark !important;
    }

    .menu {
      background: $theme-dark !important;
      border-bottom: 1px solid #18191a !important;
      //  border-top: 1px solid #18191a !important;
      // border-right: 1px solid #18191a !important;
    }

    .channel {
      background-color: rgb(32, 33, 36) !important;
      color: lightgray !important;

      &:hover {
        background-color: darken(
          $color: rgb(32, 33, 36),
          $amount: 5
        ) !important;
      }
    }

    .music_player {
      background: #121214 !important;
      border-top: 1px solid #18191a !important;
      //   border-bottom: 1px solid #18191a !important;
      //  border-right: 1px solid #18191a !important;
    }

    .video__analytics__info {
      border-bottom: 1px solid #1c1c1d !important;
    }

    .video__comment {
      background: #121214 !important;
      border: 1px solid #1c1c1d !important;
    }

    .video_comment_input {
      background: #121214 !important;
      color: white !important;
    }

    .video__comment__box {
      border-top: 1px solid #1c1c1d !important;
    }
    .video__comment__box__settings {
      border-top: 1px solid #1c1c1d !important;
    }

    .video__profile__action {
      border-bottom: 1px solid #1c1c1d !important;
    }

    .video__comment_render {
      &:hover {
        background: #232327 !important;
      }
    }
  }

  .main-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .lazy {
    height: 100%;
    flex: 0 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    padding: 10px 0;
    -ms-overflow-style: none;
    background: #e3e5e8;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .features {
    background: #f2f3f5;
    display: flex;
    border: 0;
    flex-direction: column;
    min-width: 228px;

    input {
      color: white;
      height: 2em;
      padding: 0 0.5rem;
      border: none;
      background-color: #1e2124;

      &:focus {
        background-color: #0e0f0f;
      }
    }

    .features-header {
      display: flex;
      align-items: center;
      flex: 0 0 57px;
      text-align: center;
      border-bottom: 1px solid $border-color;
      transition: background 0.15s ease;
    }

    .features-list-text,
    .features-list-voice {
      margin: 0 -20px 0 -20px;
    }

    .features-header-name {
      color: $color-theme;
      font-size: 14px;
      font-weight: 700;
      text-transform: uppercase;
      margin: auto;
      display: inline-block;
      user-select: none;
    }

    .features-list-text {
      a {
        text-decoration: none;
      }
    }

    .channel {
      cursor: pointer;
      display: flex;
      align-items: center;
      padding: 8px 20px 10px 20px;
      width: 100%;
    }

    .channel .button {
      display: none;
      opacity: 0.2;
    }

    .channel .button:hover,
    .channel .button:focus {
      opacity: 1;
    }

    .channel.active,
    .channel:hover,
    .channel:focus {
      opacity: 1;
    }

    .channel.active .button,
    .channel:hover .button,
    .channel:focus .button {
      display: block;
    }

    .channel .channel-name {
      font-size: 0.9rem;
      font-weight: 300;
    }

    .channel .button:first-of-type {
      margin-left: auto;
      margin-right: 8px;
    }

    .channel .button {
      width: 16px;
      height: 16px;
    }

    .channel-text {
      position: relative;
    }

    .channel-text.active,
    .channel-text:hover,
    .channel-text:focus {
      color: white !important;
      background: linear-gradient(to right, #282b30 85%, #2e3136);
    }

    .channel-text.active::before,
    .channel-text:hover::before,
    .channel-text:focus::before {
      content: ' ';
      width: 2px;
      height: 100%;
      position: absolute;
      left: 0;
      background: #7289da;
    }

    .channel-text .channel-name::before {
      font-weight: 400 !important;
    }

    .features-list {
      flex: 1 1;
      overflow-y: auto;
      padding: 0 20px;

      ul {
        list-style: none;
      }

      .features-list-header {
        cursor: pointer;
        margin-top: 20px;
        text-transform: uppercase;
        font-size: 0.87rem;
        letter-spacing: 0.04rem;
        transition: color 0.2s linear;
        line-height: 30px;
        position: relative;
      }

      .features-list-header:hover::after,
      .features-list-header:focus::after {
        opacity: 1;
      }

      .features-list-header::after {
        position: absolute;
        top: 10px;
        right: 0;
        content: ' ';
        width: 10px;
        height: 10px;
        opacity: 0.3;
        transition: opacity 0.2s linear;
      }
    }

    .features-footer {
      display: flex;
      align-items: center;
      margin-top: auto;
      background: #ebedef;
      border: 0;
      padding: 10px;

      .button {
        border: 0;
        cursor: pointer;
        font: inherit;
        line-height: normal;
        overflow: visible;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      .features-footer-details {
        padding: 5px;
        width: 100%;
      }

      .features-footer-controls {
        margin-left: auto;
        color: white;
        border-radius: 4px;
        display: flex;
      }

      .features-footer-controls .button {
        // background-color: #d4d7dc;
        background: transparent;
        color: white;
        display: block;
        width: 40px;
        height: 40px;

        &:hover {
          // background-color: #eef1f5;
          // border: 1px solid #b4b4b4;
        }
      }

      .avatar {
        width: 40px;
        display: inline-block;
        border-radius: 50%;
      }

      .username,
      .tag {
        display: block;
      }

      .username {
        font-size: 0.8rem;
        font-weight: 500;
      }

      .tag {
        font-size: 0.7rem;
      }
    }
  }

  .menu {
    flex: 0 0 57px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    background: white !important;
    border-bottom: 1px solid $border-color;
    //  border-top: 1px solid $border-color;
    // border-right: 1px solid $border-color;

    .menu__button {
      padding: 5px 15px;
      margin: 0 30px 0 0;
      border-radius: 5px;
      font-size: 16px;
      font-weight: 500;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
      border: 1px solid lightgrey;
      background-color: #d4d7dc;

      &.active,
      &:hover {
        background-color: #eef1f5;
      }

      i {
        margin: 0 5px;
      }

      @media only screen and (max-width: 1000px) {
        display: none;
      }
    }
  }

  .menu .menu-name {
    font-weight: bold;
    font-size: 1.3rem;
    letter-spacing: 0.05rem;
  }

  .hash-before::before,
  .features .channel-text .channel-name::before,
  .menu .menu-name::before {
    margin-right: 2px;
    font-weight: 300;
    color: #8a8e94;
  }

  .menu input {
    height: 2rem;
    border-radius: 0.25rem;
    padding: 0 1rem;
    font-size: 15px;
    font-weight: 500;
    margin: 0 5px 0 0;
    background: #d4d7dc;
    border: 1px solid lightgrey;
  }

  .menu input:focus {
    width: 300px;
    background-color: white;
  }

  .content {
    background: #fafafa;
    width: 100%;
    height: 100%;
    flex: 1 1;
    overflow-y: auto;

    .inner {
      width: 100%;

      .profile__banner {
        width: 100%;
        height: 250px;
        color: white;

        &__background {
          width: 100%;
          height: 100%;
          background: url('/public/b1.jpg');
          background-position: center;
          background-repeat: no-repeat;
          background-size: cover;
          position: relative;

          .profile__avatar {
            display: inline-block;
            border-radius: 50%;
            padding: 10px;
            margin: 10px;

            img {
              width: 100px;
              height: 100px;
            }
          }

          .follow {
            border: none;
            color: white;
            border-radius: 20px;
            display: inline-block;
            padding: 10px 30px;
            margin: 5px 20px;
            cursor: pointer;
            background-color: #43b581;

            &:hover {
              opacity: 0.8;
            }
          }

          .followers {
            color: #cecbcb;
            font-weight: 800;
          }

          .channel__name {
            font-weight: 500;
            font-size: 25px;
            padding: 10px 20px;
          }

          .social__media {
            padding: 5px;
            float: right;
            display: inline-block;
            background-color: #252a2e;

            i {
              margin: 5px;
            }
          }
        }
      }
    }

    .inner {
      overflow-y: scroll;
    }
  }

  .channel {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background-color: #d4d7dc;
    background-repeat: no-repeat;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;

    &:hover {
      background-color: darken($color: #d4d7dc, $amount: 5);
    }
  }

  .channel .channel-icon {
    border-radius: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .channel .channel-icon > img {
    border-radius: inherit;
    max-width: 100%;
  }

  .channel.channel-friends {
    margin-bottom: 20px;
    text-align: center;
  }

  .channel.channel-friends svg {
    max-width: 60%;
    max-height: 60%;
  }

  .channel.channel-friends.active::before {
    display: none;
  }

  .channel::before {
    position: absolute;
    top: 20px;
    left: -15px;
    content: ' ';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 25px;
  }

  .channel.active {
    border-radius: 15px;
    color: white !important;
    background-color: $color-theme !important;
  }

  .channel.unread::before {
    background: #8a8e94;
  }

  .channel.active::before {
    background: #fff;
    height: 40px;
    top: 5px;
  }

  .channel.active.unread::before {
    transition: all 0.2s ease-in-out;
  }
}
