.ks-image-slice {
  &__dropzone {
    background-color: var(--c-active-highlight);
    border: var(--space-xxs) dashed var(--c-active);
    text-align: center;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-m);

    p {
      font-size: var(--font-size-l);
    }
  }

  &__no-images-msg {
    background-color: var(--c-shade);
    border: var(--space-xxs) dashed var(--c-frame);
    color: var(--c-text-subdued);
    text-align: center;
    padding: var(--space-xl) var(--space-m);

    &__drag-active {
      opacity: 0;
    }
  }

  &__edit-warning {
    margin-bottom: var(--space-m);
  }
}

.ks-image-slice__image {
  &__img-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;

    &--can-edit:after {
      background-color: var(--c-active-highlight);
      content: ' ';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      min-height: var(--space-xxl);
      min-width: var(--space-xxxl);
      opacity: 0;
    }

    &--can-edit:hover:after {
      opacity: 1;
    }

    &--can-edit:hover .ks-image-slice__image__controls {
      opacity: 1;
    }
  }

  img {
    max-width: 100%;
  }

  &__controls {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    min-height: var(--space-xxl);
    min-width: var(--space-xxxl);
    opacity: 0;

    &__handle {
      color: var(--c-active);
      cursor: grab;
      position: absolute;
      top: 0;
      left: var(--space-xxxs);
    }

    &__delete-btn {
      position: absolute;
      top: 0;
      right: var(--space-xxs);
    }

    &__open-external {
      position: absolute;
      bottom: 0;
      right: var(--space-xxs);
      z-index: 1;
    }

    &__caption {
      background-color: var(--c-bg);
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      padding: var(--space-xxxs) var(--space-xxs);
      opacity: 0.8;
    }
  }
}
