/* Overlay */
.rex-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.rex-lightbox.hidden {
    display: none;
}

.rex-lightbox-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
}

/* Lightbox Content */
.rex-lightbox-content {
    position: relative;
    background: #111;
    padding: 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    width:100%;
    height:100%;
}

.rex-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
}
.rex-lightbox-close:hover {
    background-color:transparent;
}

/* Inner Layout: Big image left, thumbs right */
.rex-lightbox-inner {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: center;
    align-content:stretch;
    width: 100%;
    height:100%;
    padding:0;
}

/* Big Image + Arrows */
.rex-lightbox-main-wrap {
    position: relative;
    flex: 1;
    max-width:80%;
    display:flex;
    align-items:center;
    align-content:center;
    padding:40px;
    height:100%;
    border-right:1px solid #474747;
}

.rex-lightbox-main {
    width: auto;
    height: auto;
    margin: 0 auto;
    max-height:80vh;
}
/* Main arrow buttons */
.rex-main-nav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    border:none!important;
    background-repeat:no-repeat;
    background-position:center center;
    background-size:16px auto;
    transition:background-size 0.3s ease;
}

.rex-main-prev {
    left: 40px; /* outside left side */
    background-image: url(/wp-content/uploads/2025/07/arrow-left-334-svgrepo-com.svg);
}
.rex-main-next {
    right: 40px; /* outside right side */
    background-image: url(/wp-content/uploads/2025/07/arrow-right-333-svgrepo-com.svg);
}
.rex-main-nav:hover,
.rex-main-nav:focus{
    background-color:transparent!important;
    background-size:18px auto;
}

/* Thumbnails column */
.rex-lightbox-thumbs-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-height:calc(100% - 50px);
    width:20%;
    padding:20px;
}

.rex-thumbs-nav {
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat:no-repeat;
    background-position:center center;
    background-size:16px auto;
    transition:background-size 0.3s ease;
    border:none!important;
    z-index: 1;
}

.rex-thumbs-nav:hover,
.rex-thumbs-nav:focus {
    background-color:transparent!important;
    background-size:16px auto;
}
.rex-thumbs-prev {
    background-image: url(/wp-content/uploads/2025/07/arrow-up-340-svgrepo-com.svg);
}
.rex-thumbs-next {
    background-image: url(/wp-content/uploads/2025/07/arrow-down-339-svgrepo-com.svg);
}

/* Thumbnails viewport (no manual scroll) */
.rex-lightbox-thumbs-viewport {
    max-height: 80vh;
    overflow: hidden; /* no scrollbars */
}

/* Actual thumbs wrap inside the viewport */
.rex-lightbox-thumbs-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Thumbs */
.rex-lightbox-thumb {
    width: 170px;
    height: auto;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0.8;
    box-sizing:border-box;
    border:3px solid #000000!important;
}

.rex-lightbox-thumb:hover,
.rex-lightbox-thumb.active {
    opacity: 1;
    border:3px solid #ffffff!important;
}

/* Optional: hide scrollbars if they appear */
.rex-lightbox-thumbs-viewport::-webkit-scrollbar {
    display: none;
}
.rex-lightbox-thumbs-viewport {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


/* =========================
   Responsive, 1024px and below
   ========================= */
   @media (max-width: 1024px) {

    .rex-lightbox {
        width:100%;
    }
    .rex-lightbox-close {
        top: 20px;
        right: 10px;
    }
    /* Stack main on top, thumbs at bottom */
    .rex-lightbox-inner {
      flex-direction: column;
      align-items: stretch;
    }
  
    .rex-lightbox-main-wrap {
      max-width: 100%;
      width: 100%;
      height: auto;
      border-right: none;
      border-bottom: 1px solid #474747;
    }
  
    /* Keep arrows sensible on smaller screens */
    .rex-main-prev { left: 10px; }
    .rex-main-next { right: 10px; }
    .rex-main-nav { width: 36px; height: 36px; }
  
    /* Main image height target for mobile and tablets */
    .rex-lightbox-main {
      max-height: 70vh; /* leaves space for the thumb strip */
      max-width:90vw;
    }
  
    .rex-lightbox-thumbs-viewport{
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Thumbnails become a horizontal strip with side arrows */
    .rex-lightbox-thumbs-column {
      width: 100%;
      max-height: none;
      border-top: none; /* already added on main-wrap as bottom border */
      padding: 12px 20px; /* space for side arrows and fingers */
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 12px;
      box-sizing: border-box;
    }
  
    /* Change the arrow icons to left and right for horizontal mode */
    .rex-thumbs-prev {
      background-image: url(/wp-content/uploads/2025/07/arrow-left-334-svgrepo-com.svg);
    }
    .rex-thumbs-next {
      background-image: url(/wp-content/uploads/2025/07/arrow-right-333-svgrepo-com.svg);
    }
  
    /* Place the arrows at the sides of the strip */
    .rex-thumbs-nav {
      flex: 0 0 32px;
      width: 32px;
      height: 32px;
    }
  
    /* Viewport now scrolls horizontally, with arrows controlling movement via your JS */
    .rex-lightbox-thumbs-viewport {
      flex: 1 1 auto;
      max-height: none;
      width: 100%;
      overflow: hidden; /* no native scrollbars */
    }
  
    /* Thumbnails line up in a row */
    .rex-lightbox-thumbs-wrap {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 12px;
      /* Your JS can translateX this container for paging the thumbs */
    }
  
    /* Thumb sizing for smaller screens */
    .rex-lightbox-thumb {
      width: 96px;
      height: auto;
    }
  }
  
  /* =========================
     Extra small refinements, 640px and below
     ========================= */
  @media (max-width: 640px) {
    .rex-main-nav {
      width: 32px;
      height: 32px;
      font-size: 20px;
    }
    .rex-lightbox-thumbs-column {
      padding: 10px 5px;
      gap: 10px;
    }
    .rex-lightbox-thumb {
      width: 82px;
    }
  }
  



  /* Upcoming Auction & Inspection Feed Styles */

  .print-list {
    display: flex;
    flex-direction:column;
    row-gap: 20px;
    margin-bottom:40px;
  }
  .print-list h2 {
    font-size:26px;
    line-height:1.2em;
    color:#212121;
  }
  .rex-upcoming-list {
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap:40px;
  }
  .rex-upcoming-wrapper {
    --grid-columns: 3;
    --grid-column-gap: 40px;
  }
  .rex-upcoming-image {
    height:310px;
    background-size:cover!important;
    background-position:center 50%!important;
    padding:25px;
    display:flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start; 
    position: relative;
  }
  .rex-upcoming-image::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index:0;
  }
  .rex-upcoming-price{
    font-size:20px;
    font-weight:bold;
    line-height:1.5em;
    margin-bottom:0.5em;
    color:#ffffff;
    z-index:1;
  }
  .rex-upcoming-address {
    font-size:16px;
    font-weight:normal;
    line-height:1.5em;
    margin-bottom:0;
    color:#ffffff;
    z-index:1;
  }
  .rex-upcoming-info {
    width:100%;
    height:auto;
    border:1px solid #dddddd;
    border-top:none;
    padding:25px;
    display: grid;
    grid-template-columns: 0.3fr 0.7fr;
    grid-column-gap: 20px;
    grid-row-gap: 15px;
    align-items: center;
  }
  .rex-upcoming-info > div {
    position: relative;
    padding-left: 32px;
    display: flex;
    align-items: center;
    font-size: 16px;
  }
  
  .rex-upcoming-info > div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    background-size: contain;
    background-repeat: no-repeat;
  }
  .rex-upcoming-info-type::before {
    background-image: url(/wp-content/uploads/2025/06/house-real-estate-svgrepo-com.svg);
  }
  .rex-upcoming-info-time::before {
    background-image: url(/wp-content/uploads/2025/11/clock-seven-svgrepo-com-1.svg);
  }
  .rex-upcoming-info-agent::before {
    background-image: url(/wp-content/uploads/2025/03/team2.svg);
  }
  .rex-upcoming-info-phone::before {
    background-image: url(/wp-content/uploads/2025/05/phone-alt-svgrepo-com.svg);
  }
  .rex-upcoming-info a {
    color:#000000!important;
    text-decoration: none;
  }
  .rex-upcoming-info a:hover {
    color:#9F0AC9!important;
  }
  @media(max-width: 1100px) {
    .rex-upcoming-list {
      grid-template-columns: repeat(2, 1fr);
      gap: 30px;
    }
    .rex-upcoming-info {
      grid-column-gap: 15px;
    }
  }
  @media (max-width: 768px) {
    .rex-upcoming-list {
      grid-template-columns: 1fr;
      gap: 20px;
    }
    .rex-upcoming-image {
      height:210px;
    }
  }

.rex-upcoming-wrapper {
    cursor:pointer;
}