@import 'src/styles/variables';
@import '~flexbin/flexbin';

.wrap {
  @include row_shadow;
  position: relative;
}

.lock,
.edit {
  position: absolute;
  right: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: $radius;
  transform: translate(10px, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity 0.25s, transform 0.25s;
  cursor: pointer;
  background: $color_danger;
  z-index: 2;

  & > div {
    width: 20px;
    height: 20px;
    border-radius: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  svg {
    width: 16px;
    height: 16px;
  }

  @include tablet {
    right: 0;
    border-radius: 0 0 0 $radius;
    opacity: 1;
    transform: translate(0, 0);
    background: $content_bg_danger;
  }
}

.edit {
  top: 28px;
}

.content {
  width: 100%;
  position: relative;
  z-index: 1;
}

.block {
  @include row_shadow;

  min-height: $comment_height;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  padding-bottom: 10px;
  box-sizing: border-box;
  flex-direction: column;

  &:first-child {
    border-top-right-radius: $radius;
  }

  &:last-child {
    border-bottom-right-radius: $radius;
  }

  &:hover {
    .lock,
    .edit {
      opacity: 1;
      pointer-events: all;
      touch-action: initial;
      transform: translate(0, 0);
    }
  }
}

.block_audio {
  align-items: stretch;
  justify-content: center;
  padding-bottom: 0 !important;
}

.block_image {
  padding: $gap / 2;
}

.block_text {
  padding: $gap * 0.5 0;
}

.date {
  position: absolute;
  bottom: 1px; // should not cover block shadow
  right: 0;
  font: $font_12_medium;
  color: $gray_75;
  fill: $gray_75;
  padding: 3px 5px 3px 8px;
  z-index: 2;
  background: $content_bg_light;
  border-radius: 4px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.audios {
  & > div {
    height: $comment_height;
    border-radius: $radius;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

.renderers {
  width: 100%;
  margin: 0 !important;
}

.prefix {
  @include row_shadow;

  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu {
  position: absolute;
  right: 0;
  top: 0;
  width: 48px;
  height: 48px;
  z-index: 10;
  outline: none;
}
