/* 
Most of the styles for this page are in styles.css and other legacy 
this file consist of adjustments and aim replace legacy styles
*/

.search-page-listings {
  .listings-info {
    .top-filters__right {
      display: flex;
    }

    .top-filters__right--mobile {
      display: none;
    }

    .save-search.mobile {
      display: none;
    }
  }
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  grid-gap: 20px;

  @media screen and (max-width: 1300px) {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    
  }

  @media screen and (max-width: 500px) {
    grid-template-columns: 1fr;
  }

  .single-property-box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;

    box-shadow: 0 0px 5px rgb(0 0 0 / 5%);
    transition: 0.3s;
    border-radius: 3px;

    &:hover {
      box-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
      .property-author-wrap {
        opacity: 1;
        visibility: visible;
      }
    }

    .property-item {
      background: #fff;
      margin: 0;
      -webkit-transition: all 0.5s ease;
      -o-transition: all 0.5s ease;
      transition: all 0.5s ease;
      position: relative;

      .property-img {
        position: relative;
        overflow: hidden;
        border-top-left-radius: 3px;
        border-top-right-radius: 3px;
        width: 100%;
        height: 100%;

        @media screen and (max-width: 500px) {
          max-height: 250px;
        }

        &:before {
          position: absolute;
          top: 0;
          left: 0;
          content: "";
          width: 100%;
          height: 100%;
          background: #000;
          opacity: 0.3;
          display: none;
          transition: 0.5s;
        }

        &:hover:before {
          display: block;
        }

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          aspect-ratio: 3 / 2;
        }

        a {
          display: block;
          text-decoration: none;
          color: #000;
          font-size: 15px;
          letter-spacing: 0.025em;
          z-index: 10;
          max-height: 18vmax;
        }

        .property-author-wrap {
            position: absolute;
            bottom: 0;
            width: 100%;
            left: 0;
            z-index: 10;
            padding: 18px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
        }

        .property-favourite {
            position: absolute;
            bottom: 10px;
            right: 20px;
            z-index: 20!important;
            width: 30px;
            height: 30px;
            background-image: url(../images/love.svg);
            background-position: 50% 50%;
            background-repeat: no-repeat;
            background-size: 20px;
            border-radius: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;

            &.favorited {
              background-color: #6449e7;
              box-shadow: 1px 1px 20px #646464;
            }
        }
      }
    }

    .property-title-box {
      box-shadow: none;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
      padding: 28px;
      gap: 12px;

      h4 {
        margin-bottom: 0;
      }

      .property-feature {
        padding: 0;

        li {
          padding: 0;
        }
      }
    }
  }

}

@media screen and (max-width: 768px) {
  .search-page-listings {
    .listings-info {
        height: auto;
        padding: 0;
        margin: 10px 0;

      .top-filters__right {
        display: none;
      }

      .top-filters__right--mobile {
        display: flex;
      }

      .item-element.res-box {
        margin-top: 0;
      }

      .save-search.mobile {
        padding: 5px 15px;
        margin: 0;
        border: 1px solid #ddd;
        color: black;
        font-size: 14px;
        font-weight: 400;
        height: auto;
        background-color: white;

        &:disabled {
          background-color: #f5f5f5;
          color: #999;
        }
      }
    }
  }
}
