@use "../../common/color.module.scss";

.search {
  float: right;
}

.search input,
.search button {
  display: inline-block;
  height: 26px;
  line-height: 26px;
  margin: 0;
  vertical-align: bottom;
}

.search input {
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0 2px;
  width: 276px;
}

.search button {
  color: #818181;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.2);
  text-align: center;
  margin: 0 3px;
  cursor: pointer;
  width: 53px;
  font-size: 0.7rem;
  border-radius: 13px;
  padding: 0;
}

.search button:hover {
  background: #cf1c18;
  color: white;
}

.search button:focus {
  outline: none;
}

#translations {
  padding-top: 30px;
  max-width: none;
}

#translations .table-wrapper {
  overflow: scroll;
}

#translation table,
#translation tbody {
  display: block;
}

#translations tr {
  display: block;
}

#translations td {
  display: inline-block;
  padding: 0;
  vertical-align: middle;
  width: calc((100% - 350px) / 7);
  box-sizing: border-box;
  height: 100%;
  border: 0;
}

#translations td:first-child {
  width: 350px;
}

#translations button.download {
  border: 0;
  float: right;
  cursor: pointer;
  background: none;
  border-radius: 50%;
  color: inherit;
  height: 30px;
  width: 30px;
}

#translations button.download:hover {
  background: #efefef;
}

#translations button.download:focus {
  border: 0;
  outline: 0;
}

#translations header {
  height: 50px;
  display: flex;
  width: 100%;
  margin-bottom: 0 !important;
  padding-bottom: 0;
  padding-right: 16px;
}

#translations header > div {
  width: calc((100% - 350px) / 7);
  vertical-align: middle;
  height: 50px;
  line-height: 50px;
  align-self: flex-end;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

#translations header > div:first-child {
  width: 350px;
}

.avatarwrapper {
  position: relative;
  width: 80px;
  height: 80px;
  text-align: center;
  border-radius: 50%;
  background: #e2e2e2;
  margin-top: 10px;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    display: block;
    width: 5px;
    height: 80px;
  }
}

$red: hsl(0, 91%, 56%);
$orange: hsl(32, 91%, 56%);
$green: hsl(120, 91%, 56%);
$blue: hsl(194, 91%, 56%);
$yellow: hsl(61, 91%, 56%);
$black: hsl(230, 91%, 6%);

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red-dot {
  background: $red;
  box-shadow: 0 2px 3px 0 darken($red, 30%);
}

.orange-dot {
  background: $orange;
  box-shadow: 0 2px 3px 0 darken($orange, 30%);
}

.green-dot {
  background: $green;
  box-shadow: 0 2px 3px 0 darken($green, 30%);
}

.blue-dot {
  background: $blue;
  box-shadow: 0 2px 3px 0 darken($blue, 30%);
}

.yellow-dot {
  background: $yellow;
  box-shadow: 0 2px 3px 0 darken($yellow, 30%);
}

.black-dot {
  background: $black;
  box-shadow: 0 2px 3px 0 darken($black, 30%);
}

.users {
  .user {
    height: 100%;
    border-bottom: 1px solid #e2e2e2;
    padding: 7px 10px 20px 10px;
    position: relative;

    &:first-child {
      border-top: 1px solid #e2e2e2;
    }

    &.not-fully-registered .avatarwrapper::before {
      background: $red;
    }

    &.waiting-for-email-confirmation .avatarwrapper::before {
      background: $black;
    }

    &.active-service .avatarwrapper::before {
      background: $green;
    }

    &.inactive-service .avatarwrapper::before {
      background: $blue;
    }

    &.no-service .avatarwrapper::before {
      background: $orange;
    }

    &.company-user .avatarwrapper::before {
      background: $yellow;
    }
  }
}

.acceptance-btn {
  margin-right: 6px;
  margin-top: 5px;
  width: 100px;

  &[disabled] {
    background: color.$colorDefaultText !important;
    border-color: color.$colorDefaultText !important;
  }

  &.green {
    background-color: color.$color-green;
    border-color: color.$color-green;
  }

  &.thick {
    height: 72px;
    border-radius: 10px;

    .loading {
      float: none;
    }
  }

  .loading {
    display: block;
    float: left;
  }
}

.photo-acceptance-btn {
  cursor: pointer;
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 50%;
}

// ----------------------------------

.mainimage.admin-moderation {
  $headerSize: 50px;
  $thumbnailSize: 350px;

  position: relative;
  height: $thumbnailSize;
  width: $thumbnailSize;
  margin: $headerSize 15px 15px 15px;
  box-shadow: 0 0 7px -2px color.$color-silver;
  border-radius: 8px;

  header {
    margin: -$headerSize auto 0 auto;
    padding: 0;
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    column-gap: 10px;
    border: 0;

    & > div {
      overflow: hidden;
    }

    span {
      color: color.$colorDefaultText;
      display: block;
      white-space: nowrap;
    }

    .author {
      grid-column: 1 / span 1;
      grid-row: 1 / span 1;
      text-align: left;
    }

    .moderator {
      grid-column: 2 / span 1;
      grid-row: 1 / span 1;
      text-align: right;
    }
  }

  footer {
    margin: $thumbnailSize + 5px 0 0 0;
    padding: 0;
    display: block;
    text-align: center;

    a {
      color: color.$colorDefaultText;

      &:hover {
        color: color.$color-red;
      }
    }
  }

  .bantext {
    background: rgba(white, 0.85);
    position: absolute;
    top: 45%;
    left: 0;
    color: color.$color-red;
    padding: 7px 0;
    width: 100%;
    text-align: center;
  }

  .controls {
    display: none;
    background: rgba(black, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;

    &:hover {
      display: inline-block;
    }

    .photo-acceptance-btn {
      position: absolute;
      left: 155px;

      &.accept {
        top: 10px;
      }

      &.feature {
        top: 60px;
      }

      &.delete {
        top: 255px;
      }

      &.ban {
        top: 305px;
      }

      &:hover {
        width: 50px;
        height: 50px;
        left: 150px;

        img {
          width: 50px;
          height: 50px;
        }
      }

      &.accept:hover {
        top: 5px;
      }

      &.feature:hover {
        top: 55px;
      }

      &.delete:hover {
        top: 250px;
      }

      &.ban:hover {
        top: 300px;
      }
    }
  }

  &:hover .controls {
    display: inline-block;
  }
}
