/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

.nav-link.bg-white {
  & svg {
    filter: invert(1);
  }
}

.sd-image-grid {
  & img {
    height: 256px;
  }

  & a {
    display: block;
    position: relative;
    .badges {
      position: absolute;
      bottom: 0.5rem;
      right: 1rem;
    }
  }
}

.btn-tag-bool {
  width: 28px !important;
  height: 24px !important;
  line-height: 16px !important;
  padding: 2px;
}

.img-navigation-container {
  position: relative;

  & img {
    object-fit: contain;
  }

  --img-navigation-width: 8rem;

  .img-navigation {
    position: absolute;
    top: 0;
    height: 100%;
    width: var(--img-navigation-width);
    transition: opacity 0.2s;
    opacity: 0;
    color: white;
    font-size: 3rem;
    text-decoration: none;
    display: flex;
    align-items: center;
  }

  .img-navigation-zoom {
    background: red;
    position: absolute;
    top: 0;
    width: calc(100% - (var(--img-navigation-width) * 2));
    left: 8rem;
    height: 100%;
    opacity: 0;
    z-index: 2;
  }

  .img-navigation-left {
    left: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    justify-content: start;

    &:hover {
      opacity: 1;
    }
  }

  .img-navigation-right {
    right: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    justify-content: end;

    &:hover {
      opacity: 1;
    }
  }
}

.caption-container {
  & .caption-container-image {
    position: relative;
    overflow: hidden;
    user-select: none;

    & button {
      position: absolute;
      bottom: 8px;
      right: 8px;
      z-index: 5;
    }
  }

  &:not(.caption-container-readonly) {
    .caption {
      resize: horizontal;
      overflow: hidden;
      cursor: pointer;
    }

    .caption:hover, .caption.selected {
      outline: 8px solid rgba(255, 255, 255, 0.25);
    }
  }

  .caption {
    position: absolute;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 4;
    user-select: none;
    text-align: left;

    font-family: "Dekko", cursive;
    font-weight: 400;
    font-style: normal;

    .caption-body:empty:before {
      content: "Empty caption";
      opacity: 0.3;
    }
  }

  input[type='color'] {
    height: 32px;
    margin: 0;
    padding: 0;
  }

  input[name='font_size'] {
    width: 3rem;
    text-align: center;
  }

  textarea {
    width: 100%;
  }
}
