/*
  Theme Name:  Salient
  Description: "Property Hive" plugin basic Salient integration
*/

/* Search Form */
.property-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}
.property-search-form .control {
  display: block;
  flex: 1 1 auto;
  padding: 0;
}
.property-search-form .control label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
.property-search-form .control select,
.property-search-form .control input[type="text"],
.property-search-form .control input[type="number"] {
  width: 100%;
}
.property-search-form .control input[type="submit"] {
  background-color: var(--nectar-accent-color);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.property-search-form .control input[type="submit"]:hover {
  opacity: 0.85;
}

/* Property Shortcode Wrapper */
.propertyhive-properties-shortcode,
.propertyhive-recent-properties-shortcode,
.propertyhive-featured-properties-shortcode,
.propertyhive-similar-properties-shortcode {
  padding: 40px 0;
}

/* Property Listings - List View (default / 1 column) */
.propertyhive ul.properties {
  list-style: none;
  margin: 0;
  padding: 0;
}
.propertyhive ul.properties li {
  float: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.propertyhive ul.properties li:last-child {
  border-bottom: none;
}
.propertyhive ul.properties li .thumbnail {
  float: none;
  width: 30%;
  flex-shrink: 0;
}
.propertyhive ul.properties li .thumbnail img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--nectar-border-radius, 0);
}
.propertyhive ul.properties li .details {
  float: none;
  width: auto;
  flex: 1;
  padding-left: 25px;
}
.propertyhive ul.properties li .details h3 {
  margin: 0 0 8px;
  padding: 0;
}
.propertyhive ul.properties li .details h3 a {
  text-decoration: none;
}
.propertyhive ul.properties li .details .price {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 8px;
}
.propertyhive ul.properties li .details .summary {
  margin-bottom: 12px;
}
.propertyhive ul.properties li .details .actions .button {
  display: inline-block;
  background-color: var(--nectar-accent-color);
  color: #fff;
  padding: 8px 20px;
  text-decoration: none;
  border-radius: var(--nectar-border-radius, 0);
  transition: opacity 0.3s ease;
}
.propertyhive ul.properties li .details .actions .button:hover {
  opacity: 0.85;
}

/* Property Listings - Grid View (columns-2, columns-3, columns-4) */


.propertyhive[class*="columns-"] ul.properties {
  display: grid;
  gap: 30px;
}
.propertyhive.columns-2 ul.properties {
  grid-template-columns: repeat(2, 1fr);
}
.propertyhive.columns-3 ul.properties {
  grid-template-columns: repeat(3, 1fr);
}
.propertyhive.columns-4 ul.properties {
  grid-template-columns: repeat(4, 1fr);
}
.propertyhive[class*="columns-"] ul.properties li {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-bottom: none;
  border-radius: var(--nectar-border-radius, 0);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}
.propertyhive[class*="columns-"] ul.properties li:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.propertyhive[class*="columns-"] ul.properties li .thumbnail {
  width: 100%;
}
.propertyhive[class*="columns-"] ul.properties li .thumbnail a {
  display: block;
}
.propertyhive[class*="columns-"] ul.properties li .thumbnail img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0;
}
.propertyhive[class*="columns-"] ul.properties li .details {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.propertyhive[class*="columns-"] ul.properties li .details .price {
  margin-top: auto;
  padding-top: 10px;
}

@media only screen and (max-width: 999px) {
  .propertyhive.columns-3 ul.properties,
  .propertyhive.columns-4 ul.properties {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media only screen and (max-width: 690px) {
  .propertyhive[class*="columns-"] ul.properties {
    grid-template-columns: 1fr;
  }
}

/* Result Count & Ordering */
.propertyhive-result-count {
  float: left;
  margin: 0 0 20px;
}
.propertyhive-ordering {
  float: right;
  margin: 0 0 20px;
}
.propertyhive-ordering .orderby {
  min-width: 180px;
}

/* Pagination */
.propertyhive-pagination {
  clear: both;
  padding: 20px 0;
  text-align: center;
}
.propertyhive-pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.propertyhive-pagination ul li {
  display: inline-block;
}
.propertyhive-pagination ul li a,
.propertyhive-pagination ul li span {
  display: inline-block;
  padding: 6px 12px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--nectar-border-radius, 0);
  transition: all 0.3s ease;
}
.propertyhive-pagination ul li a:hover {
  background-color: var(--nectar-accent-color);
  border-color: var(--nectar-accent-color);
  color: #fff;
}
.propertyhive-pagination ul li span.current {
  background-color: var(--nectar-accent-color);
  border-color: var(--nectar-accent-color);
  color: #fff;
}

/* ==========================================================================
   Single Property - Hero Layout
   ========================================================================== */

.single-property div.type-property {
  padding-top: 40px;
}

/* Grid: image left, summary right, everything else full-width below */
div.type-property {
  display: grid;
  grid-template-columns: 62% 1fr;
  gap: 0 40px;
}
div.type-property > * {
  grid-column: 1 / -1;
}
div.type-property > .images {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}
div.type-property > .summary.entry-summary {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin-bottom: 0;
  padding: 30px 0;
}

/* ---------- Image Gallery / FlexSlider ---------- */

/* Remove Salient global bullet points from FlexSlider lists */
.property .images ul.slides li,
.property .images .flex-direction-nav li,
.property .images .flex-control-nav li {
  list-style: none;
}

/* Override FlexSlider default theme border/shadow */
.property .images .flexslider {
  border: none;
  box-shadow: none;
  margin: 0;
  border-radius: 5px;
  overflow: hidden;
}

/* Hide thumbnail carousel arrows entirely */
.property .images #carousel .flex-direction-nav {
  display: none;
}

/* Main slider arrows */
#ajax-content-wrap .property .images #slider .flex-direction-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
#ajax-content-wrap .property .images #slider .flex-direction-nav a {
  position: absolute;
  top: 50%;
  margin-top: -22px;
  z-index: 10;
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  overflow: hidden;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#ajax-content-wrap .property .images #slider .flex-direction-nav a:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
#ajax-content-wrap .property .images #slider .flex-direction-nav .flex-prev {
  left: 15px;
}
#ajax-content-wrap .property .images #slider .flex-direction-nav .flex-next {
  right: 15px;
}
#ajax-content-wrap .property .images #slider .flex-direction-nav a:before {
  font-family: "flexslider-icon";
  font-size: 20px;
  color: #fff;
  text-shadow: none;
  text-indent: 0;
  display: block;
  text-align: center;
  line-height: 44px;
}
#ajax-content-wrap .property .images #slider .flex-direction-nav .flex-prev:before {
  content: '\f001';
}
#ajax-content-wrap .property .images #slider .flex-direction-nav .flex-next:before {
  content: '\f002';
}
#ajax-content-wrap .property .images #slider .flex-direction-nav .flex-disabled {
  opacity: 0 !important;
  cursor: default;
}

/* Thumbnail carousel */
.property .images #carousel {
  margin-top: 10px;
}
.property .images #carousel .slides li {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.property .images #carousel .slides li:hover,
.property .images #carousel .slides li.flex-active-slide {
  opacity: 1;
}

/* ---------- Summary Panel ---------- */

.property .summary.entry-summary .property_title {
  font-size: 1.8em;
  margin: 0 0 5px;
  line-height: 1.2;
}
.property .summary.entry-summary .price {
  font-size: 1.6em;
  font-weight: 700;
  margin-bottom: 15px;
}
.property .summary.entry-summary .price .price-qualifier {
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0.7;
  display: block;
}
.property .property_meta {
  margin-bottom: 20px;
}
.property .property_meta ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.property .property_meta ul li {
  list-style: none;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.property .property_meta ul li:last-child {
  border-bottom: none;
}
.property .property_meta ul li span {
  font-weight: 600;
  min-width: 120px;
  display: inline-block;
}

/* ---------- Below-the-fold content ---------- */

.property .features {
  margin-bottom: 25px;
}
.property .features ul {
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 30px;
}
.property .features ul li {
  list-style-position: inside;
  padding: 5px 0;
}

.property .description,
.property .summary:not(.entry-summary) {
  margin-bottom: 25px;
}

/* ---------- Property Actions ---------- */

.property_actions ul li {
  list-style: none;
}
.property_actions {
  margin-top: 30px;
}
.property_actions ul {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  gap: 10px;
}
.property_actions ul li a {
  display: inline-block;
  background-color: var(--nectar-accent-color);
  color: #fff;
  padding: 10px 24px;
  text-decoration: none;
  border-radius: var(--nectar-border-radius, 0);
  transition: opacity 0.3s ease;
}
.property_actions ul li a:hover {
  opacity: 0.85;
}

/* Enquiry Form */
.property-enquiry-form .control {
  margin-bottom: 12px;
}
.property-enquiry-form .control label {
  margin-bottom: 5px;
  font-weight: 600;
}

/* Alert Messages */
.propertyhive .alert {
  padding: 12px 18px;
  border-radius: var(--nectar-border-radius, 0);
  margin-bottom: 20px;
}
.propertyhive .alert-success {
  background-color: rgba(46, 204, 113, 0.12);
  color: #1a7a3a;
}
.propertyhive .alert-danger {
  background-color: rgba(243, 46, 46, 0.1);
  color: #c0392b;
}

/* My Account */
.propertyhive-my-account {
  display: flex;
  gap: 30px;
}
.propertyhive-my-account::before,
.propertyhive-my-account::after {
  display: none;
}
.propertyhive-my-account .my-account-navigation {
  float: none;
  width: 220px;
  flex-shrink: 0;
}
.propertyhive-my-account .my-account-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.propertyhive-my-account .my-account-navigation li {
  margin-bottom: 2px;
}
.propertyhive-my-account .my-account-navigation li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: var(--nectar-border-radius, 0);
  transition: background-color 0.3s ease;
}
.propertyhive-my-account .my-account-navigation li a:hover,
.propertyhive-my-account .my-account-navigation li.active a {
  background-color: rgba(0, 0, 0, 0.06);
}
.propertyhive-my-account .my-account-sections {
  float: none;
  width: auto;
  flex: 1;
}
.propertyhive-my-account table {
  width: 100%;
}

/* Lettings Fees Popup */
#propertyhive_lettings_fees_popup {
  max-width: 600px;
}

/* Material Information */
.property-material-information {
  margin-bottom: 25px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: var(--nectar-border-radius, 0);
}

/* Responsive */
@media only screen and (max-width: 999px) {
  /* Stack hero layout on tablet */
  .property {
    grid-template-columns: 1fr;
  }
  .property .images {
    grid-column: 1;
    margin-bottom: 25px;
  }
  .property .summary.entry-summary {
    grid-column: 1;
    grid-row: auto;
    padding: 0;
  }

  .propertyhive ul.properties li .thumbnail {
    width: 35%;
  }
  .propertyhive-my-account {
    flex-direction: column;
  }
  .propertyhive-my-account .my-account-navigation {
    width: 100%;
  }
  .property .features ul {
    columns: 1;
  }
}

@media only screen and (max-width: 690px) {
  .propertyhive ul.properties li {
    flex-direction: column;
  }
  .propertyhive ul.properties li .thumbnail {
    width: 100%;
    margin-bottom: 15px;
  }
  .propertyhive ul.properties li .details {
    padding-left: 0;
  }
  .propertyhive-result-count,
  .propertyhive-ordering {
    float: none;
    display: block;
    text-align: center;
  }
  .property_actions ul {
    flex-direction: column;
  }
}
