@use 'bootstrap';

.tiled-gallery {
  margin: {
    bottom: 1rem;
    top: 6rem;
  }
  padding-bottom: 2rem;
  position: relative;
  width: 100%;

  .ps__rail-x {
    background: rgba(#2079D4, .1) !important;
    height: .5rem;
    opacity: 1 !important;
    bottom: .5rem;
  }

  .ps__thumb-x {
    background: #2079D4 !important;
    border-radius: 6px;
    height: .75rem !important;
    width: 1.5rem;
    position: relative;

    &:after {
      background: #66A5E3;
      content: '';
      height: 6px;
      left: 50%;
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 2px;
      box-shadow: 6px 0 0 0 #66A5E3, -6px 0 0 0 #66A5E3;
    }
  }
  img {
    max-height: 360px;
  }
}

.tiled-gallery-inner {
  display: flex;
  max-height: 360px;
}

.tiled-item {
  margin-right: .5rem;
  position: relative;

  &:hover {
    &:after {
      opacity: 1;
    }
  }

  &:after {
    align-items: center;
    background-color: rgba($primary, .88);
    color: #fff;
    display: flex;
    content: '🔍';
    font-size: 2rem;
    height: 100%;
    justify-content: center;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
  }

  img {
    max-width: 100vw;
  }
}

.tiled-items-container {
  display: flex;

  @include bootstrap.media-breakpoint-up(md) {
    flex-direction: column;
  }

  .tiled-item {
    @include bootstrap.media-breakpoint-up(md) {
      height: calc(50% - .25rem);
      margin-bottom: .5rem;
    }

    img {
      @include bootstrap.media-breakpoint-up(md) {
        height: 100%;
        max-width: 370px;
      }
    }
  }
}

.tiled-gallery-btn {
  margin-bottom: 5rem;
  text-align: center;
}

