@use "../mixins/function.scss" as *;
@use "../mixins/mixins.scss" as *;

@include b(image) {
  display: inline-block;
  @include e(img) {
    max-width: 100%;
  }
  @include e(preview) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  @include e(mask) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
  }
  @include e(wrapper) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  @include e(content) {
    width: 100%;
    height: 100%;
    text-align: center;
  }
  @include e(content-img) {
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
    cursor: grab;
    user-select: none;
    height: 100%;
    object-fit: cover;
    pointer-events: auto;
  }
  @include e(toolbar) {
    position: absolute;
    bottom: 46px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: getCssVar("radius", "larger");
    gap: 8px;
    pointer-events: auto;
  }
  @include e(toolbar-item) {
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: getCssVar("radius", "medium");
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    pointer-events: auto;
    &:hover {
      background-color: rgba(0, 0, 0, 0.1);
    }
    &:active {
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
}
