/* 🔥 Main Layout */
#main-layout {
  display: flex;
  gap: 20px;
  width: 100%;
  flex-wrap: nowrap;
  align-items: flex-start;
}

#map-container {
  flex: 0 0 50%;
  min-width: 500px;
  height: 85vh;
}

/* ✅ Listings Container - Now just a wrapper */
#listings-container {
  display: flex;
  flex-direction: column;
  width: 50%;
  min-width: 400px;
  gap: 10px;
  /* 🔥 Remove height and overflow here */
}


/* ✅ Card Grid */
#card-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  /* flex-grow: 1; */
  overflow-y: auto;
  height: calc(85vh - 50px);
  /* 85vh minus room for summary & pagination */
  padding: 10px;
}



/* ✅ Mobile Responsive */
@media screen and (max-width: 900px) {
  #listings-container {
    width: 100%;
    height: auto;
  }

  #card-container {
    grid-template-columns: 1fr;
  }
}


/* 🔥 Responsive */
@media screen and (max-width: 900px) {
  #main-layout {
    flex-direction: column;
  }

  #map-container,
  #listings-container {
    width: 100%;
    height: 60vh;
  }

  #listings-container {
    grid-template-columns: 1fr;
  }
}

/* 🔥 Listing Card */
.listing-card {
  border: 1px solid #ccc;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  max-height: 350px;
}

.listing-card:hover {
  background-color: #f9f9f9;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.listing-card.highlight {
  background-color: #f0f8ff;
  border: 2px solid #0074D9;
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 90%;
  object-fit: cover;
  display: block;

}

.heart {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #069;
  border-radius: 50%;
  padding: 5px 8px;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  font-size: 24px;
  color: #fff;
  transition: color 0.3s, background 0.3s;
  z-index: 9999;
}

.heart.saved {
  background: #fff;
  color: red;
  border: 2px solid red;
}

.price {
  font-size: 14px;
  font-weight: bold;
  margin-top: 5px;
  color: #069;
  border-bottom: 1px solid #ededed;
}

.address {
  font-size: 12px;
  color: #333;
  border-bottom: 1px solid #ededed;
}

.details,
.subdivision,
.property-type {
  font-size: 13px;
  color: #666;
  font-weight: bold;
}

.attribution {
  font-size: 10px;
  color: #888;
  margin-top: 8px;
}

.hive-logo {
  width: 40px;
  margin-top: 5px;
}

/* 🔥 Status Dot */
.status-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-active .status-dot {
  background-color: green;
}

.status-other .status-dot {
  background-color: red;
}

.status-coming-soon .status-dot {
  background-color: orange;
}

/* 🔥 Marker Styling */
.leaflet-div-icon.price-marker {
  background-color: #0074D9;
  color: white;
  border-radius: 20px;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  width: 60px;
  height: 30px;
  font-size: 14px;
}

.leaflet-div-icon.price-marker.hover {
  background-color: #FF4136;
}

.leaflet-tooltip.price-tooltip {
  background-color: #0074D9;
  color: white;
  border-radius: 20px;
  padding: 4px 8px;
  border: 2px solid white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  font-weight: bold;
  font-size: 14px;
}

.leaflet-popup-content-wrapper {
  background-color: #069;
  color: #fff;
  border: 2px solid #fff;
}

/* 🔥 Listing Summary */
#list-summary {
  background: #fff;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 0px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #888;
  text-align: center;
}

/* ✅ Pagination Container */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0;
}

/* ✅ Pagination Buttons */
.pagination button {
  background-color: #fff;
  color: #007cba;
  border: 1px solid #007cba;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  appearance: none;
  /* 🔥 Removes browser default */
}

/* ✅ On Hover */
.pagination button:hover {
  background-color: #007cba;
  color: white;
}

/* ✅ Active Page */
.pagination button.active {
  background-color: #007cba;
  color: white;
  font-weight: bold;
  border-color: #005fa3;
}

/* ✅ Disable Focus Outline (Optional) */
.pagination button:focus {
  outline: none;
}


/* 🔍 Map Filter Toggle */
#map-filter-toggle {
  margin-right: 8px;
}

/* 🔥 Search Suggest Bar */
.scp-search-suggest,
.scp-search-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scp-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scp-search-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1a365d;
}

.scp-advanced-search-link a {
  font-size: 14px;
  color: #1a365d;
  text-decoration: none;
  text-align: center;
  margin: 0 auto;
}

.scp-advanced-search-link:hover {
  text-decoration: underline;
}

.scp-search-bar {
  display: flex;
  position: relative;
  margin-top: 10px;
}

#scp-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
}

#scp-search-button {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

#scp-search-button i {
  font-size: 35px;
}

#scp-suggest-results {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  z-index: 9999;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
}

#scp-suggest-results div {
  padding: 10px 14px;
  cursor: pointer;
}

#scp-suggest-results div:hover {
  background: #f0f0f0;
}

#scp-suggest-results .result-group {
  background: #eee;
  padding: 6px 10px;
}

/* 🔥 Font Awesome Icons */
.my-icon {
  color: #069;
  font-size: 30px;
  padding: 5px;
}

h3 .scp-search-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

h3 .fa-tag {
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

/* ✅ Hide Lightbox Invisible Links */
.scp-gallery-hidden {
  display: none;
}

/* Image Gallery */
.property-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-primary {
  flex: 2 1 50%;
}

.gallery-primary img {
  width: 100%;
  border-radius: 0px;
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  flex: 1 1 50%;
  gap: 8px;
}

.thumbnail-item {
  position: relative;
}

.thumbnail-item img {
  width: 100%;
  border-radius: 0px;
  object-fit: cover;
}

.see-all-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 8px;
  font-size: 1.1em;
}


/* 🔥 Gallery Layout */
.scp-gallery {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border: 0px solid #ededed;
  padding: 10px 10px;
  /* box-shadow: 0 0 5px rgba(0, 0, 0, 0.05); */
  width: 100%;
}

.scp-gallery-left {
  flex: 1;
}

.scp-gallery-left img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0px;
  max-height: 400px;
}

/* ✅ The container for all thumbnails */
.scp-gallery-right {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

/* ✅ Each thumbnail (image or video) */
.scp-thumb {
  position: relative;
  overflow: hidden;
}

/* ✅ Thumbnail images — square, uniform */
.scp-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0px;
  display: block;
}

/* ✅ Overlay for image count or optional video text (if used) */
.scp-thumb .scp-more-overlay {
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  padding: 6px;
  border-radius: 4px;
  position: absolute;
  bottom: 5px;
  right: 5px;
}

//


/* 🔥 Overlay for "+X Photos" */
.scp-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0px;
}

.scp-video-button {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.scp-video-button:hover {
  background: #444;
}

.scp-tour-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.scp-tour-content {
  width: 80%;
  max-width: 960px;
  height: 80%;
  position: relative;
  background: #000;
}

.scp-tour-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.scp-tour-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}


/* ✅ Hide Lightbox Invisible Links */
.scp-gallery-hidden {
  display: none;
}

/* ✅ Property Details CSS */
.property-header {
  margin: 25px 0 0 25px;
}

.property-details-wrapper {
  margin: 25px 0;
}

.property-primary-field {
  text-align: left;

}

.property-primary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.property-section {
  margin-bottom: 0px;
  border-bottom: 0px solid #ededed;
  width: 100%;
}

/* Exclude sidebar modal containers from general property-section styles */
.property-section.sidebar-modals {
  margin-bottom: 0;
  border-bottom: none;
  border: none;
  width: auto;
}

.top-bottom-border {
  border-top: 0px solid #ededed;
  border-bottom: 0px solid #ededed;
  padding: 15px 0 0 0;
}

.property-section h3 {
  margin-bottom: 15px;
  border-bottom: 0px solid #ddd;
  padding-bottom: 5px;
}

.property-label p {
  font-weight: bold;
}

.property-section h4 {
  margin: 15px 0px;
  border-bottom: 0px solid #ddd;
  padding-bottom: 10px;

}

.no-border {
  border-bottom: none;
}

.public-remarks {
  background-color: #ededed;
}

.shadow-off {
  box-shadow: none;
}

.property-field {
  background: #fff;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 0px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
  font-size: .9em;
}

.property-status {
  font-weight: bold;
  margin-bottom: 10px;
  text-align: right;

}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* Detail Page Field Styling */
/* ✅ Property Details Responsive Grid */
.property-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Listing Card Count Formatting */
.property-type-card-title {
  padding-bottom: 5px;
}

.property-type-card-title p {
  font-weight: bold;
  color: #888;
  font-size: .8em;
  text-transform: capitalize;
}

.details {
  text-transform: capitalize;
}

.property-count {
  font-weight: bold;
}

.property-count p {
  color: #000;
  font-weight: bold;
  font-size: 1em;
}

/* Public Remarks Formating */
.property-description {
  column-count: 1;
  column-gap: 40px;
  line-height: 1.6;
  font-size: 1em;
  color: #333;
  margin: 25px 0;
}

/*Results Search Bar */

/* 🔥 Property Filter Bar */
#property-filter-bar {
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#property-filter-bar .filter-group {
  display: flex;
  flex-direction: column;
}

#property-filter-bar label {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
  color: #333;
}

#property-filter-bar input,
#property-filter-bar select {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}

#property-filter-bar input[type="number"]::-webkit-inner-spin-button,
#property-filter-bar input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#property-filter-bar .apply-filters-button {
  background-color: #1a365d;
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.2s ease;
}

#property-filter-bar .apply-filters-button:hover {
  background-color: #0e2239;
}

@media screen and (max-width: 480px) {
  #property-filter-bar {
    padding: 15px;
    gap: 10px;
  }

  #property-filter-bar label {
    font-size: 13px;
  }

  #property-filter-bar input,
  #property-filter-bar select {
    font-size: 13px;
  }
}

/*Search Bar Styling*/
/* 🔍 Toolbar Container */
.scp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* ✅ Search Terms Display */
.scp-search-terms {
  font-size: 16px;
  color: #333;
  flex: 1;
}

/* ✅ Toolbar Buttons */
.scp-toolbar-buttons {
  display: flex;
  gap: 10px;
}

.scp-toolbar-buttons button {
  background: #1a365d;
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scp-toolbar-buttons button:hover {
  background: #0f2342;
}

.scp-toolbar-buttons i {
  font-size: 16px;
}

/* ✅ Filter Panel (Hidden by default) */
.scp-filter-panel {
  display: none;
  background: #ffffff;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
}

.scp-filter-panel h4 {
  margin-bottom: 15px;
}

.scp-filter-panel .filter-group {
  margin-bottom: 15px;
}

.scp-filter-panel label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.scp-filter-panel input,
.scp-filter-panel select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.scp-close-filters {
  background: #e0e0e0;
  color: #333;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.scp-close-filters:hover {
  background: #ccc;
}




/* ✅ Mobile Responsive — Collapse to 1 column */
@media screen and (max-width: 900px) {
  .property-description {
    column-count: 1;
  }
}

#list-summary,
#pagination-container {
  display: block;
  width: 100%;
}

.property-field.two-columns ul {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
}

.property-field.one-column ul {
  columns: 1;
}

#property-search {
  width: 100%;
}

#main-layout {
  display: flex;
  width: 100%;
  gap: 20px;
}

#map-container {
  flex: 0 0 50%;
  min-width: 500px;
  height: 85vh;
}

#listings-container {
  flex: 0 0 50%;
  min-width: 400px;
}


/*______________________________
 Filter Panel Stying 
 _______________________________ */


/* ✅ Filter Panel with Smooth Toggle */

#filter-panel.open {
  max-height: 1000px;
  /* Large enough for full content */
  opacity: 1;
}


#filter-panel {
  display: none;
  position: fixed;
  top: 20%;
  /* Start near top, not center */
  left: 50%;
  transform: translateX(-50%);
  /* Only center horizontally */
  background: #ededed;
  padding: 30px;
  border: 2px solid #333;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  max-width: 480px;
  width: 90%;
  overflow-y: auto;
  max-height: 40vh;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}



#filter-panel.open {
  display: block;
}

/* Make checkboxes appear two per row */
/* Capitalize first letter */
.field-row label {
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Two checkboxes per row */
.field-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

#filter-panel .field-row {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
}

#filter-panel input,
#filter-panel select {
  /* width: 100%;*/
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 0px;

}

#filter-panel button {
  margin-top: 15px;
  padding: 10px 15px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#filter-panel button:hover {
  background-color: #005a8c;
  color: #000;
}

/* Filter Property Type Title */
.property-type-name {
  font-weight: bold;
  color: #069;
}


/* General field row styling for filter panel */
#filter-panel .field-row {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
}

#filter-panel .field-row label {
  flex: 1;
}

.field-row label {
  font-size: 12px;
  color: #888;
}

#close-filter-panel {
  position: absolute;
  top: 7px;
  right: 7px;
  background: none;
  border: none;
  font-size: 12px;
  color: #333;
  cursor: pointer;
}

/* ✅ Checkbox Grid for Property Types */
#filter-panel .checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* ✅ Dual-width columns */
  gap: 12px 15px;
  /* Row gap and column gap */
}

#filter-panel .checkbox-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* ✅ Dual-width columns */
  gap: 12px 15px;
  /* Row gap and column gap */
}

#filter-panel .checkbox-grid label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  white-space: nowrap;
  /* ✅ Prevent label text from wrapping */
  text-transform: capitalize;
  font-size: 14px;

}

#filter-panel label {
  font-size: 14px;
  font-weight: bold;
}


@media (max-width: 480px) {
  #filter-panel .field-row {
    flex-direction: column;
  }
}

/* ✅ Layout for Toolbar Row */
.scp-toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-suggest-box {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-suggest-box input {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-suggest-box button {
  font-size: 30px;
}

/*padding: 8px 12px;
  background-color: none;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}*/

.toolbar-filter-button button {
  padding: 8px 10px;
  border: none;
  background-color: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ✅ Filter Chips Styling */
.scp-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.scp-filter-chip {
  background-color: #f1f1f1;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.scp-filter-chip button {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  margin-left: 8px;
  cursor: pointer;
  line-height: 1;
}

.scp-filter-chip button:hover {
  color: #000;
}

/* Capitalize first letter of each word in the checkbox labels */
.field-row label {
  text-transform: capitalize;
}

/* ✅ Disable page scrolling when filter is open */
body.filter-open {
  overflow: hidden;
}

.sort-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  z-index: 9999;
  margin-top: 5px;
}

.sort-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.sort-dropdown button:hover {
  background-color: #f1f1f1;
}

/* Cards Only View */
.cards-only #map-container {
  display: none;
}

.cards-only #listings-container {
  width: 100%;
}

.cards-only #main-layout {
  flex-direction: column;
}

.cards-only #listings-container {
  width: 100%;
  flex: 1 1 auto;
}

.cards-only #card-container {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  /* Optional: auto fit more cards */
}

.map-only #main-layout {
  display: block;
  width: 100%;
}

.map-only #map-container {
  width: 100%;
  /* Full viewport width */
  height: 100vh;
  /* Full viewport height */
  margin: 0;
  padding: 0;
  flex: none;
}

.map-only body,
.map-only html {
  margin: 0;
  padding: 0;
  overflow: hidden;
  /* Optional: removes scrollbars */
}

.map-only #listings-container {
  display: none;
}

#scp-map-view {
  display: none;
}

/* 🔷 Modal Layout - DEFINITIVE Z-INDEX FIX */
.modal {
  display: none;
  position: fixed;
  z-index: 9999999 !important;
  /* Higher than map modal's 999999 */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

/* Specific styling for sidebar modals to avoid conflicts with property sections */
.sidebar-modals {
  position: static !important;
  z-index: auto !important;
  display: block !important;
  border: none !important;
  /* Override accordion styles */
  border-radius: 0 !important;
  /* Override accordion styles */
  overflow: visible !important;
  /* Override accordion styles */
}

.sidebar-modals .modal {
  z-index: 9999999 !important;
  /* Same as main modal rule */
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 99999999 !important;
  /* Even higher than modal */
}

/* 🔷 Close Button */
.close-button {
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 999999999 !important;
  /* Absolutely highest to stay on top */
  color: #333;
}


.close-button:hover {
  color: Red;
}

/* 🔷 Grid Layout for Forms */
.scp-form-grid .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.scp-form-grid .form-row.full-width {
  flex-direction: column;
}

.scp-form-grid label {
  flex: 1;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.scp-form-grid input,
.scp-form-grid select,
.scp-form-grid textarea {
  margin-top: 5px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* 🔷 Textarea */
.scp-form-grid textarea {
  min-height: 80px;
  resize: vertical;
}

/* 🔷 Submit Button */
.scp-form-grid button[type="submit"] {
  background-color: #0066cc;
  color: white;
  font-size: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.scp-form-grid button[type="submit"]:hover {
  background-color: #004fa3;
}

/* 🔷 Success/Error Message */
.form-message {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* ✅ Modal Open/Close Animations */
.modal {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

input:invalid,
select:invalid,
textarea:invalid {
  border: 2px solid red;
}

input:valid,
select:valid,
textarea:valid {
  border: 1px solid #ccc;
}


#request-info-button,
#schedule-showing-button {
  border: 1px solid #666;
  border-radius: 0px;
  /*box-shadow: 0 0 3px rgba(0,0,0,0.2);*/
  font-size: 16px;
  padding: 8px 8px;
  margin: 10px auto;
  display: block;
  width: 100%;

}

/*Adding Sidebar*/

/* Old wrapper CSS - replaced by property-layout-container */
/*
.property-details-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
*/

/* Old layout CSS removed - using updated responsive layout below */

/* Property Navigation Section */
.property-navigation-section {
  margin-bottom: 20px;
  display: block !important;
  visibility: visible !important;
  min-height: 50px;
  /* Ensure it's visible even when empty */
  background: transparent;
  /* For debugging - you can remove this */
}

.property-navigation-section .scp-nav-buttons {
  display: block !important;
  visibility: visible !important;
  min-height: 40px;
  /* Ensure container is visible */
}

/* Details Page Nav Styling */
/* Navigation container */
.listing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  padding: 10px 0;
  border-top: 0px solid #eee;
  border-bottom: 0px solid #eee;
  flex-wrap: wrap;
}

.nav-left,
.nav-center,
.nav-right {
  flex: 1;
  text-align: center;
}


.nav-left {
  text-align: left;
}

.nav-right {
  text-align: right;
}

.nav-button {
  display: inline-block;
  padding: 8px 16px;
  background: white;
  color: #0066cc;
  border: 1px solid #0066cc;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
}

.nav-button:hover {
  background-color: #0066cc;
  color: white;
}

/* ✅ Sticky on Mobile */
@media (max-width: 768px) {
  .listing-nav {
    position: sticky;
    bottom: 0;
    z-index: 999;
    background: white;
    padding: 12px 16px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  }
}

#scp-current-search {
  display: none;
}

.card-image-wrapper {
  position: relative;
}

.gform_wrapper .scp-save-mls {
  display: none !important;
}

/* ✅ Modal Form Layout */
#scp-register-modal .modal-content {
  max-width: 600px;
  margin: auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  z-index: 1001;
}

#scp-register-modal .close-button {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

#scp-register-modal .form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

#scp-register-modal .two-columns>label {
  flex: 1;
}

#scp-register-modal .full-width {
  flex-direction: column;
}

#scp-register-modal input,
#scp-register-modal select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
}

#scp-register-modal button[type="submit"] {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ✅ Responsive (mobile) */
@media (max-width: 600px) {
  #scp-register-modal .form-row {
    flex-direction: column;
  }
}

/* MLS Attribution - Full width at bottom of page */
.mls-attribution {
  width: 100% !important;
  max-width: none !important;
  margin: 20px 0 0 0 !important;
  padding: 20px !important;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  clear: both;
}

.mls-attribution p {
  margin: 0 !important;
  text-align: center;
  font-size: 12px !important;
  color: #555 !important;
  line-height: 1.5 !important;
}

.mls-attribution img {
  height: 40px !important;
  vertical-align: middle !important;
  margin-right: 10px !important;
}

/* ========================================
   SIDEBAR STYLES
======================================== */

/* Sidebar Heart/Save Icon */
.property-container-sidebar .heart {
  position: relative;
  top: 0;
  right: 0;
  margin: 0 auto 20px auto;
  display: block !important;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 40px;
  font-size: 28px;
  border-radius: 50%;
  background: #069;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.property-container-sidebar .heart:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.property-container-sidebar .heart.saved {
  background: #fff;
  color: red;
  border: 3px solid red;
}

/* Sidebar Action Buttons */
.sidebar-actions {
  margin-bottom: 25px !important;
}

.sidebar-actions button {
  width: 100%;
  padding: 12px 20px;
  margin-bottom: 10px;
  background: #069;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-actions button:hover {
  background: #057db8;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-actions button:last-child {
  margin-bottom: 0;
}

/* Sidebar Information Rows */
.sidebar-info {
  margin-bottom: 25px !important;
}

.sidebar-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  line-height: 1.4;
}

.sidebar-info-row:last-child {
  border-bottom: none;
}

.sidebar-info-row .info-label {
  font-weight: 600;
  color: #333;
  min-width: 120px;
  flex-shrink: 0;
}

.sidebar-info-row .info-value {
  text-align: right;
  color: #666;
  word-break: break-word;
  max-width: 60%;
}

/* Special styling for price */
.sidebar-info-row:first-child .info-value {
  font-weight: 700;
  color: #069;
  font-size: 16px;
}

/* Sidebar Map Section */
.sidebar-map {
  margin-bottom: 20px !important;
}

.sidebar-map h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px !important;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  padding-bottom: 8px;
  border-bottom: 2px solid #069;
}

.sidebar-map h4 i {
  color: #069;
  font-size: 18px;
}

.sidebar-map-container {
  height: 200px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-style: italic;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 200px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Property Section Spacing */
.property-container-sidebar .property-section {
  margin-bottom: 25px;
  padding-bottom: 0;
  border-bottom: none;
}

.property-container-sidebar .property-section:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments for sidebar */
@media (max-width: 991px) {
  .property-container-sidebar .heart {
    margin: 0 auto 15px auto;
    width: 40px;
    height: 40px;
    line-height: 34px;
    font-size: 24px;
  }

  .sidebar-actions button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .sidebar-info-row {
    font-size: 13px;
    padding: 10px 0;
  }

  .sidebar-info-row .info-label {
    min-width: 100px;
  }

  .sidebar-map-container {
    height: 150px;
  }

  .property-title h1 {
    font-size: 16px;
  }

  .scp-search-header h2 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .sidebar-info-row {
    flex-direction: column;
    gap: 5px;
  }

  .sidebar-info-row .info-label {
    min-width: auto;
  }

  .sidebar-info-row .info-value {
    text-align: left;
    max-width: 100%;
  }
}

/* Sidebar Map Enhancements */
.sidebar-map-container .leaflet-container {
  border-radius: 5px;
  border: 1px solid #ddd;
  height: 200px !important;
  width: 100% !important;
}

/* Override flex layout when map is loaded */
.sidebar-map-container:has(.leaflet-container) {
  display: block !important;
  align-items: unset !important;
  justify-content: unset !important;
}

/* Map loading and loaded states */
.sidebar-map-container.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-map-container.map-loaded {
  display: block !important;
  align-items: unset !important;
  justify-content: unset !important;
}

.sidebar-map-container .leaflet-popup-content-wrapper {
  border-radius: 5px;
}

.sidebar-map-container .leaflet-popup-content {
  font-size: 14px;
  line-height: 1.4;
}

/* Ensure map controls are visible */
.sidebar-map-container .leaflet-control-zoom {
  border: none;
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.sidebar-map-container .leaflet-control-zoom a {
  background-color: #fff;
  color: #333;
  border-bottom: 1px solid #ccc;
}

.sidebar-map-container .leaflet-control-zoom a:hover {
  background-color: #f4f4f4;
}

/* Attribution styling */
.sidebar-map-container .leaflet-control-attribution {
  font-size: 10px;
  background-color: rgba(255, 255, 255, 0.8);
}

/* Map Expand Hint */
.map-expand-hint {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  padding: 5px;
  background: rgba(0, 105, 153, 0.1);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-expand-hint:hover {
  background: rgba(0, 105, 153, 0.2);
  color: #069;
}

.map-expand-hint i {
  margin-right: 5px;
}

/* Sidebar Map Click Cursor */
.sidebar-map-container {
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-map-container:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Expanded Map Modal */
.map-modal {
  display: none !important;
  position: fixed !important;
  z-index: 999999 !important;
  left: 0;
  top: 0;
  width: 100% !important;
  height: 100% !important;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8) !important;
  animation: fadeIn 0.3s ease;
}

.map-modal.show {
  display: block !important;
}

.map-modal-content {
  background-color: #fff;
  margin: 2% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.map-modal-content h3 {
  margin: 0;
  padding: 20px 20px 15px 20px;
  background: #069;
  color: white;
  border-radius: 8px 8px 0 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-modal-content h3 i {
  font-size: 20px;
}

.map-close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease;
}

.map-close-button:hover {
  color: #ffcccc;
}

.expanded-map-container {
  flex: 1;
  height: calc(85vh - 70px);
  width: 100%;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.expanded-map-container .leaflet-container {
  height: 100% !important;
  width: 100% !important;
  border-radius: 0 0 8px 8px;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsive adjustments for expanded map */
@media (max-width: 768px) {
  .map-modal-content {
    width: 95%;
    height: 90vh;
    margin: 5% auto;
  }

  .map-modal-content h3 {
    padding: 15px;
    font-size: 16px;
  }

  .map-close-button {
    top: 10px;
    right: 15px;
    font-size: 24px;
  }

  .expanded-map-container {
    height: calc(90vh - 60px);
  }
}

/* Ensure modal appears above everything */
.map-modal {
  z-index: 999999 !important;
}

.map-modal * {
  box-sizing: border-box;
}

/* ================================================
   RESPONSIVE PROPERTY DETAILS LAYOUT - SIDEBAR LEFT
   ================================================ */

/* Desktop Layout: Sidebar left, Content right */
.property-layout-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
  align-items: flex-start;
  clear: both;
}

.property-layout-container .property-container-sidebar {
  flex: 0 0 28% !important;
  max-width: 28% !important;
  width: 28% !important;
  padding: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  order: 1 !important;
  /* Sidebar first on desktop (left side) */
  float: none !important;
  /*position: relative;*/
}

.no-border {
  border: 0px solid #000 !important;
}

.property-layout-container .property-container-right {
  flex: 0 0 70% !important;
  max-width: 70% !important;
  width: 70% !important;
  order: 2 !important;
  /* Content second on desktop (right side) */
  float: none !important;
}

/* Mobile-First: Sidebar above content on mobile */
@media (max-width: 991px) {
  .property-layout-container {
    flex-direction: column !important;
    gap: 15px;
  }

  /* On mobile, sidebar appears first (above content) */
  .property-layout-container .property-container-sidebar {
    order: 1 !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 15px !important;
    margin-bottom: 15px;
    position: static !important;
  }

  /* Then content appears below */
  .property-layout-container .property-container-right {
    order: 2 !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 992px) {
  .property-layout-container .property-container-sidebar {
    flex: 0 0 33% !important;
    max-width: 33% !important;
  }

  .property-layout-container .property-container-right {
    flex: 0 0 65% !important;
    max-width: 65% !important;
  }
}

/* ================================================
   RESPONSIVE GALLERY IMPROVEMENTS
   ================================================ */

/* Mobile gallery improvements */
@media (max-width: 768px) {
  .scp-gallery {
    flex-direction: column;
    gap: 15px;
  }

  .scp-gallery-left {
    flex: none;
  }

  .scp-gallery-left img {
    max-height: 250px;
  }

  .scp-gallery-right {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .scp-thumb img {
    aspect-ratio: 4/3;
  }
}

@media (max-width: 480px) {
  .scp-gallery-right {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================
   PROPERTY DESCRIPTION TRUNCATION
   ================================================ */

.property-description.truncated {
  position: relative;
  margin: 25px 0;
}

.property-description .description-text {
  transition: all 0.3s ease;
  font-size: 14px;

}

.property-description .description-text.truncated-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

.property-description .learn-more-btn {
  color: #007cba;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
  margin-left: 5px;
  display: inline;
}

.property-description .learn-more-btn:hover {
  color: #005a87;
}

/* ================================================
   ACCORDION FUNCTIONALITY FOR PROPERTY SECTIONS - MODAL FRIENDLY
   ================================================ */

/* Only apply accordion styles to accordion sections, not all property-sections */
.property-section.accordion-section {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  /* REMOVED: overflow: hidden - this was creating stacking contexts that interfered with modals */
  transition: all 0.3s ease;
  /* Ensure modals can escape from accordion containers */
  position: static !important;
  z-index: auto !important;
}

.property-section.accordion-section h4 {
  background: #f8f9fa;
  margin: 0;
  padding: 15px 20px;
  cursor: pointer;
  position: relative;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
  user-select: none;
}

.property-section.accordion-section h4:hover {
  background: #e9ecef;
}

.property-section.accordion-section h4::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.property-section.active h4::after {
  content: '−';
  transform: translateY(-50%) rotate(0deg);
}

.property-section.accordion-section .property-details-grid {
  display: none;
  padding: 20px;
  background: #fff;
  /* MODAL FRIENDLY: Removed animation that could interfere with stacking */
  /* animation: slideDown 0.3s ease-out; */
  /* Ensure no stacking context interference */
  position: static !important;
  z-index: auto !important;
}

.property-section.active .property-details-grid {
  display: block;
}

/* Special styling for first section (description) - always open */
.property-section.accordion-section:first-child:not(.property-navigation) {
  border: none;
  border-radius: 0;
  margin-bottom: 20px;
}

.property-section.accordion-section:first-child:not(.property-navigation) h4 {
  display: none;
  /* Hide accordion behavior for description */
}

.property-section.accordion-section:first-child:not(.property-navigation) .property-details-grid {
  display: block !important;
  padding: 0;
}

/* Navigation section should always be visible */
.property-section.property-navigation {
  display: block !important;
  visibility: visible !important;
  margin-bottom: 20px;
  border: none;
}

.property-section.property-navigation .scp-nav-buttons {
  display: block !important;
  visibility: visible !important;
}

/* Mobile accordion improvements */
@media (max-width: 768px) {
  .property-section h4 {
    padding: 12px 15px;
    font-size: 15px;
  }

  .property-section .property-details-grid {
    padding: 15px;
  }
}

/* No information message styling */
.no-info-message {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 4px;
  margin: 0;
}

/* =========== Sidebar Classes (Non-Modal Containers) =========== */
.sidebar-actions,
.sidebar-info,
.sidebar-modals {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-actions.no-border,
.sidebar-info.no-border {
  border: none;
  box-shadow: none;
}

/* Modal Container - No visual styling needed */
.sidebar-modals {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

/* NUCLEAR OPTION: Force all modals and their contents to highest z-index */
#request-info-modal,
#schedule-showing-modal,
.modal,
.modal * {
  z-index: 9999999 !important;
}

/* Specifically target modal content and close buttons */
.modal .modal-content,
.modal .close-button {
  z-index: 99999999 !important;
}

/* MODAL-ACCORDION FIX: Ensure modals escape any stacking context created by accordions */
.modal {
  /* Break out of any parent stacking contexts */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  /* Force creation of new stacking context at root level */
  z-index: 9999999 !important;
  /* Ensure it's not affected by parent overflow */
  clip: auto !important;
  overflow: visible !important;
}

/* MLS Config */

.scp-multi-select {padding: 10px 10px}