.ps-media__page {
  --grid-items: 4;
  --item-radius: var(--BORDER-RADIUS--MD);
}

.ps-media__page-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--PADD--MD);
}

.ps-media__page-list-view {
  @if $rtl {
    margin-left: var(--PADD);
  } @else {
    margin-right: var(--PADD);
  }
}

.ps-media__page-list {
  display: grid;
  grid-template-columns: repeat(var(--grid-items), 1fr);
  grid-column-gap: var(--PADD);
  grid-row-gap: var(--PADD);

  @include mq($until: tablet) {
    --grid-items: 2;
  }

  > .ps-alert {
    grid-column-start: 1;
    grid-column-end: span var(--grid-items);
  }
}

.ps-media__page-list--small {}

.ps-media__page-list--large {
  --grid-items: 2;
}

.ps-media__page-list-item {
  //background-color: var(--PS-COLOR--APP--DARKER);
  border-radius: var(--item-radius);
  overflow: hidden;
}

.ps-media__page-list-item--audio {}

.ps-media__page-list-item-inner {
  position: relative;
  height: 100%;

  &:before {
    content: "";
    height: 0;
    display: block;
    padding-top: 100%;
    width: 1px;
    position: relative;
  }

  > a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 0 10px #000;

    > img {
      width: auto;
      max-width: none;
      height: 150%;

      .ps-media__page-list-item--audio & {
        height: 100%;
      }
    }

    &:hover {
      color: #fff;

      i {
        opacity: 1;
      }
    }
  }

  i {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    font-size: 24px;
    text-align: center;
    opacity: .8;
    transition: opacity .2s ease;
  }
}

.ps-media__page-list-item-title {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: var(--PADD);
  background: rgba(0,0,0,.8);
  right: 0;
  font-size: 75%;
  line-height: 1.3;

  span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    transition: display .3s;
  }

  &:after {
		display: none;
		content: attr(data-tooltip);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,.8);
    color: #ddd;
    font-size: 12px;
    padding: 8.5px;
    white-space: nowrap;
    border-radius: 4px;
    z-index: 10;
  }

  &:hover {
    span {
      display: block;
    }
  }
}
