@import '../../../variables';

.card-inside {
  background-color: $light-theme-bg-color;
  border-radius: 0.5em;
  overflow: hidden;
  -webkit-border-radius: 0.5em;
  -moz-border-radius: 0.5em;
  -ms-border-radius: 0.5em;
  -o-border-radius: 0.5em;
  padding: 0.2em;
  display: block;
  width: 100%;
  margin-top: 1em;

  &__title {
    font-weight: bold;
    font-size: 1.1em;
    padding: 0.5em;
  }
}


.player--dark#player-container,
.v-application.theme--dark {
  .friends-container {
    &__main {
      background-color: $dark-theme-bg-color;
    }

    .friends-toggle-button {
      background-color: $dark-theme-panel-bg-color;
    }

    .card-title-medium {
      padding: 0 0.7em;
      margin-bottom: 0.6em;
      color: $dark-theme-text-color;
    }

    .friends-list {
      color: $dark-theme-text-color;

      ul {
        li {
          .top-side {
            .infos {
              .name-container {
                .name {
                  color: $dark-theme-text-color;
                }
              }
            }
          }

          .bottom-side {
            .options {
              & > button {
                color: $dark-theme-text-color;
              }
            }
          }
        }
      }
    }
  }

  .card-inside {
    background-color: $dark-theme-bg-color;
  }

  .friends-container {
    &__main {
      background-color: $dark-theme-bg-color;
    }

    .friends-toggle-button {
      background-color: $dark-theme-panel-bg-color;
    }

    .card-title-medium {
      padding: 0 0.7em;
      margin-bottom: 0.6em;
      color: $dark-theme-text-color;
    }

    .friends-list {
      color: $dark-theme-text-color;

      ul {
        li {
          .top-side {
            .infos {
              .name-container {
                .name {
                  color: $dark-theme-text-color;
                }
              }
            }
          }

          .bottom-side {
            .options {
              & > button {
                color: $dark-theme-text-color;
              }
            }
          }
        }
      }
    }
  }
}


.friends-container {
  position: relative;
  //min-width: 17em; // TODO: WHY?
  width: 100%;

  .icon {
    img {
      width: 1em;
    }
  }

  &__title {
    font-weight: bold;
    font-size: 1.2em;
    padding: .5em;
  }

  &__main {
    background-color: $light-theme-bg-color;
  }

  .friends-list {
    padding: 0 0.3em;
    cursor: pointer;
    // font-size: 95%;
    ul {
      list-style: none;

      li {
        padding: 0.5rem 0.3rem;
        border-radius: 25px;

        .top-side {
          display: flex;

          .avatar {
            margin-right: 1rem;
            position: relative;

            img {
              border-radius: 50%;
              width: 3em;
            }

            .status {
              border-radius: 50%;
              height: 0.65em;
              width: 0.65em;
              position: absolute;
              right: 5px;
              bottom: 6px;

              &-online {
                background-color: #23a823;
              }

              &-offline {
                background-color: #afafaf;
              }
            }
          }

          .infos {
            flex-grow: 2;

            .name-container {
              display: flex;
              justify-content: space-between;
              align-items: center;
              padding-right: 2em;
              position: relative;

              .name {
                color: $light-theme-text-color;
                margin-right: 1em;
                max-width: 150px;
              }
            }

            .activity-container {
              overflow-x: hidden;
              position: relative;
              padding-right: .5em;
              max-width: 150px;

              .hiding-box-left {
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                width: 15px;
                background-image: linear-gradient(to right, var(--light-theme-bg-color) 0%, transparent 100%);
              }

              .hiding-box-right {
                position: absolute;
                right: 0;
                top: 0;
                bottom: 0;
                width: 15px;
                background-image: linear-gradient(to left, var(--light-theme-bg-color) 0%, transparent 100%);
              }

              .activity {
                font-size: 0.9em;
                white-space: nowrap;
                padding: .2em 0;
                width: 100%;
                animation: slide-to-left linear 12s infinite;

              }
            }
          }
        }

        .bottom-side {
          max-height: 0;
          overflow: hidden;
          transition: max-height 1s ease-out;

          .options {
            padding-top: 0.9em;
            display: flex;
            padding: 0.2em 0.4em;
            justify-content: space-around;
            text-align: center;

            & > * {
              display: flex;
              flex-direction: column;
              align-items: center;
              border-radius: 10px;
              cursor: pointer;
              padding: 0.3em 0.4em;

              &:hover {
                background-color: rgba(88, 88, 88, 0.26);
              }
            }

            & > button {
              border: none;
              background-color: transparent;
              color: $light-theme-text-color;
            }
          }
        }

        &:hover {
          background-color: rgba(150, 150, 150, 0.05);

          .bottom-side {
            max-height: 100px;
          }
        }
      }
    }
  }
}
