/* ==== base.css ==== */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background-color: #fafdfd;
  color: #191c1d;
}

/* Welcome Modal Styles */
.welcome-modal-content {
  border: 2px solid #f7A100;
}

.welcome-modal-icon {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  margin-left: -10px;
}

.welcome-modal-title {
  font-size: 1.75rem;
  line-height: 1.2;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: break-word;
  display: block;
}

/* Modal body text word breaking for URLs */
#welcomeModal .modal-body p,
#caribbeancribsModal .modal-body p {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ==== theme.css ==== */
/*start of css code that allows to set the primary color for the property listings page*/

body.propertylistings,
body.propertylistings .btn-primary,
body.propertylistings .btn-outline-primary,
body.propertylistings a,
body.propertylistings a:hover {
  /* Primary color and variants */
  --bs-primary: #1c7430;
  --bs-primary-rgb: 28, 116, 48;
  --bs-primary-hover: #165c28;

  /* Additional Bootstrap variables */
  --bs-blue: #1c7430;
  --bs-indigo: #1c7430;
  --bs-purple: #1c7430;
  --bs-pink: #1c7430;
  --bs-red: #1c7430;
  --bs-orange: #1c7430;
  --bs-yellow: #1c7430;
  --bs-green: #1c7430;
  --bs-teal: #1c7430;
  --bs-cyan: #1c7430;

  /* Link colors */
  --bs-link-color: #1c7430;
  --bs-link-hover-color: #165c28;
  --bs-link-color-rgb: 22, 92, 40;


  /* Active states */
  --bs-primary-active: #165c28;
  --bs-primary-bg-subtle: #e9f7ee;
  --bs-primary-border-subtle: #c3e6cf;
  --bs-primary-text-emphasis: #1c7430;

  /* Button specific variables */
  --bs-btn-active-bg: #165c28;
  --bs-btn-active-border-color: #165c28;
  --bs-btn-active-color: #fff;
  --bs-btn-hover-bg: #165c28;
  --bs-btn-hover-border-color: #165c28;
  --bs-btn-hover-color: #fff;

  /* Bootstrap 5 btn-primary specific variables */
  --bs-btn-bg: #1c7430;
  --bs-btn-border-color: #1c7430;
  --bs-btn-color: #fff;
  --bs-btn-disabled-bg: #1c7430;
  --bs-btn-disabled-border-color: #1c7430;
  --bs-btn-disabled-color: #fff;
  --bs-btn-focus-shadow-rgb: 49, 132, 253;

  /* Bootstrap 5 btn-outline-primary specific variables */
  --bs-btn-outline-color: #1c7430;
  --bs-btn-outline-border-color: #1c7430;
  --bs-btn-outline-hover-bg: #1c7430;
  --bs-btn-outline-hover-border-color: #1c7430;
  --bs-btn-outline-hover-color: #fff;
  --bs-btn-outline-active-bg: #165c28;
  --bs-btn-outline-active-border-color: #165c28;
  --bs-btn-outline-active-color: #fff;
  --bs-btn-outline-disabled-color: #1c7430;
}

body.propertylistings .form-check-input:checked {
  background-color: #1c7430;
  border-color: #1c7430;
}

/* Bedroom selector specific styling - light and white version */
body.propertylistings .filter-section .btn-group .btn-check:checked + .btn-outline-primary {
  background-color: #d9d9da;
  border-color: #dee2e6;
  color: #495057;
}

body.propertylistings .filter-section .btn-group .btn-outline-primary {
  background-color: #fff;
  border-color: #dee2e6;
  color: #495057;
}

body.propertylistings .filter-section .btn-group .btn-outline-primary:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
  color: #495057;
}

body.propertylistings .filter-section .btn-group .btn-outline-primary {
  border-color: #dee2e6;
  color: #6c757d;
}

/*end of css code that allows to set the primary color for the property listings page*/

/* ==== map.css ==== */
/* Ensure the map page doesn't scroll but other pages can */
body.propertylistings {
  overflow: hidden;
}

#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* Adjust map container when sidebar is visible */
body.sidebar-visible #map {
  margin-left: 260px; /* Match sidebar width */
  width: calc(100% - 260px); /* Adjust width to account for sidebar */
}

/* Info Window Styling */
.info-window {
  font-family: 'Arial', sans-serif;
  max-width: 320px;
  color: #191c1d;
  background-color: #fff;
  border-radius: 12px;
  padding: 0px 4px 4px;
  overflow: hidden;
}

.info-window h2 {
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 8px 0;
  color: #191c1d;
}

/* ======== SHARE BUTTON & MENU ======== */

.details-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px 12px 8px;
}

.details-row .details {
  flex: 1;
  margin: 0;
}

.info-window-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  position: relative; /* anchor for the share menu */
  top: -6px; /* lines the icons up with the middle of the price text */
}

/* Icon-style share button (circular with icon) */
.share-btn-icon {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--bs-primary);
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.share-btn-icon:hover {
  background-color: #f1f3f4;
  color: var(--bs-primary-hover);
}

.share-btn-icon:active {
  background-color: #e8eaed;
}

.share-btn-icon i {
  font-size: 16px;
}

/* Apple share symbol, shown on iPhone/iPad/Mac instead of the dots (AppUtils.shareIconClass in utils.js).
   It is an outline glyph: thickened like the heart (favorites.css) so the two icons side by side match.
   Used by both the popup button above and the list card button (list-view.css). */
.share-icon-apple {
  -webkit-text-stroke: 0.6px currentColor;
}

.share-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 4px 0;
  z-index: 1000;
  min-width: 140px;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #191c1d;
  text-align: left;
  transition: background-color 0.15s;
}

.share-option:hover {
  background-color: #f1f3f4;
}

.share-option:active {
  background-color: #e8eaed;
}

.share-option i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.share-option i {
  color: #5f6368;
}

/* Bottom buttons row (View Details) */
.info-window-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px 8px 12px 8px;
  position: relative;
}

/* Style both buttons consistently */
.info-window-buttons .btn {
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, box-shadow 0.2s;
}

.info-window-buttons .btn:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Popup share menu (next to the price) opens upward over the photo: the popup clips what sticks out below */
.info-window-actions .share-menu {
  bottom: 100%;
  top: auto;
  margin-top: 0;
  margin-bottom: 4px;
}

/* ======== TOAST NOTIFICATION ======== */

.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #323232;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.share-toast.show {
  opacity: 1;
}

/* Mobile adjustments for share menu */
@media (max-width: 480px) {
  .share-option {
    padding: 12px 14px;
  }

  .share-toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: none;
    text-align: center;
  }
}

.thumbnail-container {
  width: 100%;
  height: 160px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f1f3f4;
}

.info-window .thumbnail {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.image-source {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  background-color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  color: #757575;
  text-align: right;
}

.image-source a {
  color: #757575;
  text-decoration: none;
}

.image-source a:hover {
  text-decoration: underline;
}

.image-source a:focus {
  outline: none;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #444;
  font-size: 14px;
  text-align: center;
  background-color: #f1f3f4;
  border-radius: 8px;
}

.no-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-window .description {
  font-size: 14px;
  font-weight: 400;
  color: #3f484a;
  margin: 12px 8px 12px 8px;
  line-height: 1.4;
}

.info-window .realtor-info {
  margin: 12px 8px 12px 8px;
}

.info-window .details {
  font-size: 14px;
  font-weight: 400;
  color: #191c1d;
  margin: 0 8px 12px 8px;
  line-height: 1.6;
}

.info-window .more-info {
  display: block; /* Change display to block */
  width: fit-content; /* Adjust width to content size */
  margin-left: auto; /* Push the button to the right */
  margin-right: 8px; /* Maintain right margin */
  margin-top: 4px; /* Keep original top margin */
  margin-bottom: 12px; /* Keep original bottom margin */
  background-color: var(--bs-primary);
  color: #ffffff;
  text-decoration: none;
  padding: 6px 10px; /* Reduced padding */
  font-size: 12px; /* Reduced font size */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em; /* Reduced letter spacing */
  transition: background-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
}

.info-window .more-info:hover {
  background-color: var(--bs-primary-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Marker Cluster Styling */
.cluster-marker {
  color: #001d35;
  background: #d6e4ff;
  border-radius: 9999px;
  padding: 12px;
  width: 12px;
  height: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  border: 2px solid var(--bs-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Spiderfied Marker Styling */
.spiderfied-marker {
  z-index: 1000 !important;
}

.spider-leg {
  background-color: var(--bs-primary);
  opacity: 0.7;
}

/* Loading indicator */
#loading-indicator {
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 2000;
}

/* Custom list button in map control */
.custom-list-button {
  background-color: var(--bs-primary) !important;
  color:#FFF!important;
  transition: background-color 0.3s;
}

.custom-list-button:hover {
  background-color: var(--bs-primary-hover) !important;
  color: white !important;
}

/* List button text styling */
.custom-list-button div,
.list-button-text {
  transition: color 0.3s;
  color: white !important; /* Force white text color */
}

.custom-list-button:hover div,
.custom-list-button:hover .list-button-text {
  color: white !important;
}

/* Map control button: THE one button look for the view controls, in both views. Used by the map controls
   (map-module.js addCustomControls: Filter, Grid, My favorites, settings) and by the list toolbar (index.html:
   Filter, Sort, Map, My favorites, settings). All metrics live here and nowhere else, so nothing changes size when switching views:
   16px text, 6px/12px padding, 1px transparent border = 38px high. */
.map-control-button {
  background-color: var(--bs-primary);
  color: var(--bs-btn-color);
  border: 1px solid transparent;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  font-family: 'Roboto', Arial, sans-serif;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;
  font-weight: normal;
  border-radius: 0.25rem;
}

/* Phones: four buttons must fit next to each other in the list toolbar (360px wide, Dutch labels), so the
   buttons drop their icon and take less side padding. One rule for both views, so the map's controls shrink
   in exactly the same way. */
@media (max-width: 460px) {
  .map-control-button {
    padding: 6px 8px;
  }
  .map-control-button > .bi {
    display: none;
  }
}

/* A row of view-control buttons: the spacing between them is the same on the map and in the list toolbar. */
.map-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons that open a menu (Sort) are Bootstrap dropdown toggles. Their caret is a white chevron
   instead of Bootstrap's border triangle, so it reads on the green button. */
.map-control-button.dropdown-toggle::after {
  border: 0;
  width: 12px;
  height: 8px;
  margin-left: 7px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}



/* Styling for the source link placed on the thumbnail */
.thumbnail-link {
  position: relative; /* Needed for absolute positioning of the source text */
  display: block; /* Ensure the link takes up block space */
}

.thumbnail-source {
  position: absolute;
  bottom: 0; /* Align to the very bottom */
  left: 0; /* Align to the left edge */
  width: 100%; /* Stretch across the full width */
  background-color: rgba(255, 255, 255, 0.7); /* Transparent white background */
  color: #333; /* Darker text for contrast */
  padding: 4px 8px; /* Adjust padding */
  font-size: 0.7rem; /* Smaller font size */
  line-height: 1.2; /* Adjust line height for padding */
  text-align: right; /* Keep text aligned to the right */
  z-index: 1; /* Ensure it's above the image */
  box-sizing: border-box; /* Include padding in the width */
}

/* Location source fine print at the bottom of the info window */
.location-source {
  font-size: 10px;
  color: #757575;
  text-align: center;
  margin: 4px 8px -2px 8px;
  font-style: italic;
}

/* ==== list-view.css ==== */
/* List View Container */
#list-container {
  height: 100vh;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #f8f9fa;
  padding: 0;
  z-index: 900;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* List view layout */
.list-view-layout {
  height: 100%;
  width: 100%;
}

/* Sidebar now as a direct child of body */
#filter-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  min-width: 260px;
  background-color: #f8f9fa;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e0e0e0;
  transition: transform 0.3s ease-in-out;
  z-index: 950;
}

/* Default collapsed state for desktop */
#filter-sidebar.collapsed {
  transform: translateX(-260px);
}

#filter-sidebar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Sidebar toggle button */
#sidebar-toggle {
  background-color: transparent;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
  padding: 0 4px;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* When sidebar is collapsed, make toggle button visible outside */
#filter-sidebar.collapsed #sidebar-toggle {
  visibility: hidden; /* Hide the toggle button when collapsed */
}

.list-main-content {
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin-left: 0; /* Default margin when sidebar is collapsed */
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
  width: 100%;
  box-sizing: border-box;
}

/* Adjust main content when sidebar is visible */
body.sidebar-visible .list-main-content {
  margin-left: 260px; /* Match sidebar width */
  width: calc(100% - 260px); /* Adjust width to account for sidebar */
}

/* Ensure list container takes full width */
body.sidebar-visible #list-container {
  width: 100%;
  left: 0;
}

/* Show sidebar in both map and list view */
#filter-sidebar {
  display: flex; /* Always display, visibility controlled by classes */
}

/* Control sidebar visibility with classes */
body.sidebar-collapsed #filter-sidebar {
  transform: translateX(-260px);
}

body.sidebar-visible #filter-sidebar {
  transform: translateX(0);
}

/* List toolbar */
.list-toolbar {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  z-index: 950;
  width: 100%;
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.properties-count {
  font-size: 16px;
  font-weight: 500;
  color: #555;
  padding-left: 5px;
}

#list-toolbar h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-right: 8px;
}

/* Style toolbar buttons to match filter panel buttons */
#list-toolbar .btn-sm {
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 4px;
}

.list-content {
  flex: 1;
  margin: 0;
  padding: 15px 15px 0;
}

/* Property Cards */
.property-card {
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: relative;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Card header row with title and share button */
.property-card .card-header-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 8px 12px;
}

.property-card .card-title {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  max-height: 3rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Share button wrapper with dropdown menu */
.property-card .card-share-wrapper {
  position: relative;
  flex-shrink: 0;
}

.property-card .card-share-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--bs-primary);
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.property-card .card-share-btn:hover {
  background-color: #f1f3f4;
  color: var(--bs-primary-hover);
}

.property-card .card-share-btn i {
  font-size: 16px;
}

/* Share menu dropdown for cards */
.property-card .share-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 4px 0;
  z-index: 1000;
  min-width: 140px;
}

.property-card .card-img-top {
  height: 200px;
  object-fit: cover;
  background-color: #f1f3f4;
}

.property-card .card-body {
  padding: 1rem;
  display: flex; /* Enable Flexbox */
  flex-direction: column; /* Stack items vertically */
  flex-grow: 1; /* Allow body to grow */
}

/* Make the content above the button grow to push the button down */
.property-card .card-body > *:not(.btn) {
  flex-grow: 1; /* Allow content elements to grow */
}

/* Ensure the button doesn't grow and stays at the bottom */
.property-card .card-body .btn {
  margin-top: auto; /* Push button to the bottom */
  flex-shrink: 0; /* Prevent button from shrinking */
}

.property-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Price and location row */
.price-location-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 8px;
}

/* Make price less prominent */
.price-tag {
  font-weight: 500; /* Less bold */
  font-size: 1.1rem; /* Reduced size */
  color: #191c1d;
  margin-bottom: 0; /* Remove bottom margin since it's in flex container */
  flex-shrink: 0; /* Don't let price shrink */
}

/* Slightly smaller features text */
.property-features {
  display: flex;
  gap: 10px;
  margin-top: 8px; /* Adjust spacing */
  color: #666;
  font-size: 0.85rem; /* Reduced size */
}

/* Clickable location styling in price row */
.price-location-row .location-clickable {
  cursor: pointer;
  color: #198754;
  border-radius: 3px;
  padding: 2px 4px;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 50%;
  min-width: 0;
  font-size: 0.9rem;
}

.price-location-row .location-clickable:hover {
  background-color: rgba(25, 135, 84, 0.1);
  color: #146c43;
}

/* Location text with ellipsis */
.location-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Icon-only location styling */
.price-location-row .location-icon-only {
  max-width: none;
  min-width: auto;
  padding: 4px 6px;
}

/* Slightly smaller description text */
.property-card .card-text {
  font-size: 0.9rem; /* Reduced size */
  line-height: 1.4;
  margin-bottom: 0.5rem; /* Reduced space before realtor info */
}

/* Realtor info styling */
.property-card .realtor-info {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.property-source {
  font-size: 0.75rem;
  color: #999;
  margin-top: 10px;
}

.property-source a {
  color: #666;
  text-decoration: none;
}

.property-source a:hover {
  text-decoration: underline;
}

/* Load More Spinner */
#load-more-spinner {
  position: relative;
  width: 100%;
  clear: both;
}


/* Map popup overlay */
.map-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Map popup content */
.map-popup {
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Map popup header */
.map-popup-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
}

.map-popup-header h5 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.map-popup-header .btn-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
  color: #666;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.map-popup-header .btn-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

.map-popup-header .btn-close:active {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Map popup content area */
.map-popup-content {
  flex: 1;
  display: flex;
  min-height: 350px;
}

/* The actual map container */
.popup-map {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .map-popup {
    max-width: 95vw;
    max-height: 70vh;
  }
  
  .map-popup-content {
    min-height: 250px;
  }
  
  .popup-map {
    min-height: 250px;
  }
}

/* Extra-wide screens: 6 cards per row.
   Bootstrap's row-cols-* classes on #property-list (templates/index.html) stop at
   xxl (5 columns from 1400px), so cards would get very wide on big monitors.
   The ID selector outranks Bootstrap's .row-cols-xxl-5 > * rule. */
@media (min-width: 1900px) {
  #property-list > * {
    flex: 0 0 auto;
    width: 16.66666667%;
  }
}

/* Toggle button styling for both map and list view */
.map-view-toggle, .list-view-toggle {
  cursor: pointer;
  padding: 0 4px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
}

.map-view-toggle:hover, .list-view-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ==== filter-panel.css ==== */
/* Filter Panel Styling */
#filter-panel {
  position: absolute;
  top: 20px;
  left: -280px; /* Start off-screen from left side */
  width: 260px;
  max-height: calc(100vh - 40px); /* Limit height to viewport minus margins */
  z-index: 1000;
  font-size: 14px;
  display: block; /* Always display, but positioned off-screen initially */
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  transition: left 0.5s ease-in-out; /* Changed from right to left transition */
  display: flex;
  flex-direction: column;
  border:none;
}

#filter-panel.visible {
  left: 20px; /* Final position when visible */
}

/* Filter panel in sidebar */
#filter-sidebar-container #filter-panel {
  position: static;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  margin-right: 0;
  margin-bottom: 0;
  transition: none;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
}

#filter-sidebar-container #filter-panel.visible {
  right: auto;
}

/* Add padding to filter content in sidebar */
#filter-sidebar-container .filter-content {
  padding: 0 15px 15px;
  flex: 1;
  overflow-y: auto;
}

/* Add padding to filter footer in sidebar */
#filter-sidebar-container .filter-footer {
  padding: 10px 15px;
  flex-shrink: 0;
}

#filter-header {
  cursor: grab;
  padding: 8px 12px;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent header from shrinking */
  position: relative; /* For tooltip positioning */
  touch-action: none; /* Prevent scrolling while dragging on mobile */
}

/* Increase touch target size when dragging on mobile */
#filter-header.active-drag {
  cursor: grabbing;
}

/* Styling for the filter header in sidebar mode */
#filter-sidebar-container #filter-header {
  cursor: default;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  background-color: #ffffff;
  color: #333;
  flex-shrink: 0;
  padding: 10px 15px;
  height: 55px; 
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hide collapse button in sidebar view */
#filter-sidebar-container #collapse-toggle {
  display: none;
}

#filter-sidebar-container .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#filter-header:active {
  cursor: grabbing;
}


#filter-header:hover::after {
  opacity: 1;
}

/* Hide tooltip in sidebar mode */
#filter-sidebar-container #filter-header::after {
  display: none;
}

#collapse-toggle {
  cursor: pointer;
  padding: 0 4px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#collapse-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#filter-panel.collapsed .card-body {
  display: none;
}

#filter-panel.collapsed {
  transition: transform 0.3s ease-in-out, left 0.3s ease-in-out, bottom 0.3s ease-in-out, top 0.3s ease-in-out;
  width: auto !important; /* Allow width to shrink to content */
  min-width: 180px; /* Ensure minimum width */
}

/* Make the header more visible when collapsed */
#filter-panel.collapsed #filter-header {
  border-radius: 5px; /* Give it rounded corners when collapsed */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Add stronger shadow for visibility */
}

#collapse-toggle i {
  transform: rotate(0deg);
  transition: transform 0.3s ease-in-out;
  display: inline-block; /* Ensures transform works properly */
}

#filter-panel.collapsed #collapse-toggle i {
  transform: rotate(180deg);
}

/* Filter panel state transitions */
#filter-panel.transitioning {
  transition: none !important;
}

#filter-panel:not(.transitioning) {
  transition: right 0.5s ease-in-out, opacity 0.3s ease-in-out;
}

.card-body { /* Note: This might be too general, consider scoping if needed */
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollable filter content */
.filter-content {
  flex: 1 1 auto;
  overflow-y: auto;
  scroll-behavior: smooth;
  /* For Firefox */
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

/* Scrollbar styling for Chrome, Safari, and Edge */
.filter-content::-webkit-scrollbar {
  width: 6px;
}

.filter-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.filter-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.filter-content::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Fixed footer */
.filter-footer {
  flex-shrink: 0;
  background-color: #fff;
  padding-top:0px!important;
}

.filter-footer hr {
  margin-top:0px!important;
}

.filter-section {
  margin-bottom: 20px;
}


.section-header {
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 8px;
}

.section-header:hover {
  background-color: #e9ecef;
}

.section-header i {
  transition: transform 0.2s;
}

.section-header.collapsed i {
  transform: rotate(-90deg);
}

/* Checkbox spacing */
.form-check {
  margin-bottom: 3px;
  padding-left: 1.8rem;
}

/* Price slider styling */
.ui-slider {
  margin: 13px 10px 8px;
  height: 5px;
  background: #e9ecef;
  border: none;
  border-radius: 3px;
  width: calc(100% - 20px);
}

.ui-slider .ui-slider-range {
  background: var(--bs-primary);
}

.ui-slider .ui-slider-handle {
  width: 16px;
  height: 16px;
  background: var(--bs-primary);
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  top: -6px;
  touch-action: none;
}

.ui-slider .ui-slider-handle:focus {
  outline: none;
}

/* Button styling for bedrooms */
.btn-group {
  margin-top: 5px;
}


/* Disclaimer text styling */
.disclaimer {
  color: #6c757d;
  font-size: 10px;
  line-height: 1.2;
  padding: 0 5px;
}

/* Filters button with slide indicator */
#show-filters-btn {
  position: relative;
  background-color: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

#container-apply-filter-button {
  display:none;
  padding-top:18px;
}

.filter-section-smallinfo
{
  color: #6c757d;
  font-size: 10px;
  line-height: 1.2;
  padding: 0 5px;
}

/* Amenities toggle styling */
.amenities-toggle {
    margin-top: 8px;
    text-align: left;
    margin-left: 9px;
}

.amenities-toggle a {
  color: var(--bs-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.amenities-toggle a:hover {
  color: var(--bs-primary);
  text-decoration: underline !important;
}

.amenities-toggle i {
  transition: transform 0.2s ease;
  margin-right: 4px;
}

/* Keywords input group focus styling */
#keywords-input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #86b7fe !important;
}

#keywords-input:focus ~ #keywords-search-btn {
  border-color: #86b7fe !important;
}

/* Add focus outline to the parent input-group when input is focused */
.filter-section .input-group:has(#keywords-input:focus) {
  outline: 0.25rem solid rgba(13, 110, 253, 0.25);
  border-radius: 0.375rem;
}

/*search area section*/
#minimap {/*it has 227px width available*/
  background: url('/map-assets/images/map-curacao.png');
  background-size: 160px 135px;
  height:135px;
  width:160px;
  margin:12px auto 0px;
  overflow:hidden;
  position:relative;
  cursor: pointer;
}

#searchareaminimap {
  position:absolute;
  top:20px;
  left: 20px;
  width: 20px;
  height:20px;
  border: 2px solid var(--bs-primary);
  background-color: rgba(13, 110, 253, 0.3);
  border-radius: 1px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display:none;
}

#searchareaclickhere {
    text-align: center;
    padding-top: 56px;
    color: #727272;
    margin-right: 18px;
    display:none;
}

#searchareaminimap:hover {
  background-color: rgba(13, 110, 253, 0.5);
  /*transform: scale(1.05);*/
}

#searchareaminimap:active {
  transform: scale(0.98);
}

/* Geobounds selector modal map container */
#geobounds-selector-map {
  width: 100%;
  height: 600px;
  min-height: 400px;
}

/* Make modal extra large on bigger screens */
@media (min-width: 1200px) {
  #geoboundsModal .modal-xl {
    max-width: 90%;
  }

  #geobounds-selector-map {
    height: 70vh;
  }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  #geobounds-selector-map {
    height: 400px;
  }
}

@media (max-width: 460px) {
  .hide-beyond-460px-width {
    display:none;
  }
}

/* Keywords search feedback messages */
#keywords-no-results,
#keywords-error {
  display: none;
  font-size: 11px;
  color: #dc3545;
  margin-top: 5px;
  margin-bottom: -4px;
}

/* ==== favorites.css ==== */
/* Favorites: heart button base styles. Same size as .card-share-btn (list-view.css) so they sit well side by side. */
.favorite-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--bs-primary); /* same green as the share icon next to it */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0; /* keep the size in the card header row next to a long title */
}

.favorite-btn i {
  font-size: 16px;
  -webkit-text-stroke: 0.6px currentColor; /* thickens the thin outline heart so it matches the solid share icon */
}

/* Saved: filled red heart */
.favorite-btn[aria-pressed="true"] {
  color: #d93025;
}

.favorite-btn:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Login window: hide the Turnstile container while it is empty */
#login-turnstile:empty {
  display: none;
}

/* Login window: the Turnstile box is centered, with room above it once Cloudflare shows it
   (auth-module.js adds .is-shown then; hidden, the widget is 0px high and must not take up space) */
#login-turnstile {
  display: flex;
  justify-content: center;
}

#login-turnstile.is-shown {
  margin-top: 24px;
}

/* Login window: the reassurance line under the email field ("free, no spam, never shared") is fine print:
   smaller and lighter than Bootstrap's .form-text, so the email field and the button stay the focus */
.login-small-print {
  font-size: 12px;
  color: #868e96;
}

/* Login window: the six one-digit boxes for the emailed code (code-input.js) */
.login-code {
  display: flex;
  gap: 8px;
}

.login-code input {
  flex: 1 1 0;
  min-width: 0; /* lets the boxes shrink on narrow phones */
  max-width: 48px;
  padding-left: 0;
  padding-right: 0;
  font-size: 1.25rem;
  text-align: center;
}

/* "My favorites" button (top right, map and list toolbar): heart icon + label like the other view buttons.
   On phones (same breakpoint as map.css, where the other buttons drop
   their icon) it is the other way round: the label "My favorites" / "Mijn favorieten" is too long to fit
   next to the other buttons, so this button keeps its heart and drops the label there. */
@media (max-width: 460px) {
  .map-control-button[data-control="favorites"] > .bi {
    display: inline-block;
  }
  .map-control-button[data-control="favorites"] .favorites-label {
    display: none;
  }
}

/* Favorites view (body.favorites-view, set by App.switchView): the list layout without the filter options.
   !important because app.js shows/hides the sidebar and the Filter button with inline styles. */
body.favorites-view #filter-sidebar,
body.favorites-view #show-filters-btn {
  display: none !important;
}

/* No sidebar, so the cards always get the full width (also if a window resize re-expands the sidebar state) */
body.favorites-view .list-main-content {
  margin-left: 0;
  width: 100%;
}

/* Toolbar buttons: a view never shows its own button. The favorites view offers Grid and Map (both go back
   to searching); the list view offers Map and My favorites. */
body.favorites-view #list-toolbar [data-control="favorites"],
body:not(.favorites-view) #back-to-list-btn {
  display: none;
}

/* The title "My favorites (9)" (in the place of "9 properties found"): larger, bold and brand green, so it
   reads as the page title of this view */
body.favorites-view #list-count-toolbar {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-primary);
}

/* Phones: the title must stay visible (responsive.css hides the list count there), so it gets its own line
   above the buttons */
@media (max-width: 768px) {
  body.favorites-view #list-count-toolbar {
    display: block;
  }
  body.favorites-view #list-toolbar .container-fluid > .d-flex {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}

/* Favorites view, list: "off the market" section below the cards */
.gone-favorites {
  max-width: 720px;
  margin: 24px auto;
  padding: 0 16px;
}

.gone-favorite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
}

.gone-favorite-row a,
.gone-favorite-row span {
  min-width: 0;
  overflow-wrap: anywhere; /* a long realtor URL must not widen the page */
}

/* Bin button at the end of an "off the market" row: removes that favorite. Brand green, same size as the
   heart button so the rows line up with the cards' hearts. */
.gone-remove-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--bs-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0; /* keep the size next to a long realtor URL */
}

.gone-remove-btn i {
  font-size: 16px;
}

.gone-remove-btn:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Login window: "Send a new code". A <button> (it does something, and auth-module.js disables it while a
   request or the robot check runs) that looks like a text link.
   It has no .btn classes on purpose: theme.css sets the green button colours on <body>, so every .btn
   inherits them for its hover and disabled states. As a .btn-link this control became a faded green box
   with unreadable grey text whenever it was disabled. */
#login-resend {
  /* Same box as the "Log in" button beside it (.btn padding + 1px border), so the two texts line up */
  padding: 0.375rem 0.75rem;
  margin-left: 0.25rem; /* room for the keyboard focus ring, which otherwise touches the "Log in" button */
  border: 1px solid transparent;
  background: none;
  color: var(--bs-link-color);
  text-decoration: underline;
  vertical-align: middle;
}

#login-resend:hover {
  color: var(--bs-link-hover-color);
}

#login-resend:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Disabled: plain grey text without underline, so it reads as "not available right now" instead of a link */
#login-resend:disabled {
  color: #6c757d;
  text-decoration: none;
  cursor: default;
}

/* ==== settings.css ==== */
/* Settings popup (#settingsModal in index.html), opened by the profile-icon button in the map controls and the
   list toolbar: currency, language, cookie choice and account, one row each. */

/* Settings button (profile icon): icon only at every screen size. map.css hides the icons of the view buttons on phones
   (they keep their label there); this one has no label, so it keeps its icon. */
.map-control-button[data-control="settings"] > .bi {
  display: inline-block;
}

/* One setting per row: label left, control right */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.settings-row:first-child {
  padding-top: 0;
}

.settings-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-label {
  font-weight: 500;
}

/* Currency codes read in lower case, and the euro as "euro" instead of the code "eur" (Thom 2026-11-10).
   Done in CSS because chh-currency.js (shared with the marketing site) only knows the codes usd|eur|xcg. */
.settings-row .currency-btn {
  text-transform: lowercase;
}

.settings-row .currency-btn[data-currency="eur"]::after {
  content: "o";
}

/* Cookies row: the checkbox with its small explanation. Left-aligned text in a block that takes the room
   next to the row label, so the explanation wraps neatly on phones. */
.settings-cookie {
  flex: 1;
  max-width: 280px;
  min-width: 0;
}

/* Account row while logged in: the email address above the Log out button, right-aligned.
   min-width 0 + ellipsis: a long address is cut off instead of widening the popup. */
.settings-account {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
}

.settings-account[hidden] {
  display: none;
}

#account-email {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6c757d;
  font-size: 14px;
}

/* Buttons in the popup: white with a green outline, and solid green for the chosen currency / language
   (.active). The site theme (theme.css) fills every .btn-outline-primary green, which would make the chosen
   option look the same as the others; the id selector wins over the theme's rule. */
#settingsModal .btn-outline-primary {
  --bs-btn-bg: #fff;
  --bs-btn-color: #1c7430;
  --bs-btn-border-color: #1c7430;
  --bs-btn-hover-bg: #e8f1ea;
  --bs-btn-hover-color: #1c7430;
  --bs-btn-hover-border-color: #1c7430;
  --bs-btn-active-bg: #1c7430;
  --bs-btn-active-color: #fff;
  --bs-btn-active-border-color: #1c7430;
}

/* ==== responsive.css ==== */
/* Responsive adjustments */

/* Mobile-optimized sidebar toggle */
@media (max-width: 768px) {
  #sidebar-toggle {
    padding: 8px 16px;
    margin-right: -5px;
    height: 28px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary) !important;
    border: 1px solid white !important;
    color: white !important;
    border-radius: 4px;
    font-weight: 100;
    white-space: nowrap;
  }

  /* Hide chevron icon on mobile */
  #sidebar-toggle i.bi-chevron-left {
    display: none;
  }

  /* Show "Apply Filters" text on mobile */
  #sidebar-toggle .sidebar-toggle-text {
    display: inline;
  }

  /* Show apply filter button on mobile */
  #apply-filters-btn {
    display: inline-block !important;
  }
}

/* Hide "Apply Filters" text on desktop (>768px) */
@media (min-width: 769px) {
  #sidebar-toggle .sidebar-toggle-text {
    display: none;
  }
}

/* Non-touch devices - ensure touch-friendly class has no effect */
@media (pointer: fine) {
  .ui-slider .ui-slider-handle.touch-friendly {
    width: 16px;
    height: 16px;
    top: -6px;
    margin-left: -6px;
  }
}

/* Touch devices - apply touch-friendly styles */
@media (pointer: coarse) {
  .ui-slider .ui-slider-handle.touch-friendly {
    width: 24px;
    height: 24px;
    top: -10px;
    margin-left: -12px;
  }

  .ui-slider {
    height: 8px;
    margin: 15px 0;
  }

  .ui-slider .ui-slider-handle {
    width: 26px;
    height: 26px;
    top: -10px;
    margin-left: -13px;
  }
}


@media (max-width: 768px) {
  /* List view layout adjustments for mobile */
  .list-view-layout {
    width: 100%;
  }

  /* Make sidebar fullscreen on mobile when visible */
  #filter-sidebar {
    width: 100%;
    min-width: auto;
    height: 100vh; /* Fallback for older browsers */
    height: 100dvh; /* Dynamic viewport height - accounts for iOS Safari browser chrome */
    padding: 0;
    border-right: none;
    border-bottom: none;
    position: fixed; /* Fixed position to cover the entire screen */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f8f9fa;
    z-index: 1000; /* Above most content */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  }

  /* Fix for collapsed sidebar on mobile - remove from layout flow */
  #filter-sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: -1; /* Place behind other content */
  }
  
  /* Ensure main content takes full width on mobile */
  .list-main-content {
    margin-left: 0 !important;
    width: 100% !important;
    transition: none !important; /* Disable transitions on mobile for better performance */
  }
  
  /* Reset list container position on mobile */
  #list-container {
    width: 100% !important;
    left: 0 !important;
  }
  
  /* Reset map container on mobile */
  #map {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Make the filter panel take full space on mobile */
  #filter-sidebar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  /* Make the filter panel fill the entire screen */
  #filter-sidebar-container #filter-panel {
    margin: 0;
    border: none;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #filter-sidebar-container .filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    max-height: none; /* Allow content to fill available space */
  }

  /* Add larger header for mobile filter panel */
  #filter-sidebar-container #filter-header {
    padding: 15px;
    height: 60px;
    align-items: center;
    font-size: 18px;
  }

  /* Larger close button in mobile filter header */
  #filter-sidebar-container #sidebar-toggle {
    font-size: 14px;
    padding: 0px 8px;
  }

  /* More spacing between filter sections on mobile */
  #filter-sidebar-container .filter-section {
    margin-bottom: 20px;
  }

  /* Larger touch targets for checkboxes/radio buttons */
  #filter-sidebar-container .form-check {
    padding-left: 2.2rem;
    margin-bottom: 8px;
  }

  /* Simplify toolbar on mobile devices */
  .list-toolbar {
    padding: 8px 0; /* Slightly reduce the padding */
  }

  /* Hide the properties count text on mobile */
  #list-count-toolbar {
    display: none;
  }

  /* Make buttons more compact */
  #list-toolbar .btn-sm {
    padding: 3px 8px;
    font-size: 12px;
  }

}

@media (max-width: 576px) {
  #filter-panel {
    width: 220px;
    top: 10px;
    right: 10px;
  }



  /* Adjust tooltip position on mobile to avoid it going off-screen */
  #filter-header::after {
    top: 100%;
    left: 0;
    transform: none;
  }

  /* Specific positioning for very small screens */
  #filter-panel.collapsed {
    bottom: 10px !important;
    left: 10px !important;
  }

  /* Further simplify toolbar on very small devices */
  .list-toolbar {
    padding: 6px 0; /* Even more compact padding */
  }

  /* More compact buttons on smallest screens */
  #list-toolbar .btn-sm {
    padding: 2px 6px;
    font-size: 11px;
  }

  /* Add space between toolbar items */
  #list-toolbar .container-fluid {
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Tighter spacing between the view-control buttons (same on the map and in the list toolbar) */
  .map-control-group {
    gap: 6px;
  }

  /* Tighten up spacing in dropdown menu */
  #list-toolbar .dropdown-menu {
    min-width: auto;
    font-size: 0.9rem;
    padding: 0.25rem 0;
  }

  #list-toolbar .dropdown-item {
    padding: 0.25rem 0.75rem;
  }
}

/* Mobile-specific adjustments for filter panel */
@media (pointer: coarse) {
  /* Larger touch targets for mobile */
  #filter-header {
    padding: 12px 16px; /* Larger padding for better touch target */
    min-height: 50px; /* Ensure minimum height for touch target */
  }

  /* Mobile tooltip positioning - shown below instead of above */
  #filter-header::after {
    top: 100%; /* Position below instead of above */
    left: 50%;
    transform: translateX(-50%);
  }

  /* Make drag handle more obvious on mobile */
  /*disabled with a good reason don't uncomment
  /*#filter-header::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    pointer-events: none;
  }*//*disabled for now don't activate*/

  /* Move collapsed filter panel to bottom left on small screens */
  #filter-panel.collapsed {
    bottom: 20px !important;
    top: auto !important;
    left: 20px !important;
    right: auto !important;
  }

}

/* Ensure filter panel stays on screen during orientation change */
@media screen and (orientation: portrait), screen and (orientation: landscape) {
  #filter-panel.transitioning {
    transition: none !important;
  }
}

/* Enhanced filters button for mobile */
@media (max-width: 768px) {
  /* Size, weight and shadow come from .map-control-button (map.css), like every other view-control button */
  #show-filters-btn:active {
    transform: scale(0.95);
  }

  /* Add subtle animation to the chevron */
  #show-filters-btn i.bi-chevron-right {
    transition: transform 0.3s ease;
  }

  #show-filters-btn:hover i.bi-chevron-right {
    transform: translateX(3px);
  }
}

/* ==== cookie-consent.css ==== */
/*
 * Cookie banner + "Cookie settings" link (markup in templates/index.html, shown/hidden by
 * map-assets/js/cookie-consent.js).
 * Small card in the bottom-left corner of the map on desktop (right of the filter sidebar), a panel along
 * the bottom on phones.
 * No overlay: the map stays fully usable while it shows.
 * z-index 9000: above the filter panel (1000) and list view, below the property popup overlay (9999)
 * and toasts (10001), so a listing someone opens is never covered.
 * The marketing site has its own copy of these styles (repos/marketing website/assets/css/cookie-consent.css).
 */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9000;
  width: 340px;
  max-width: calc(100% - 32px);
  padding: 16px;
  background: #fff;
  color: #222220;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__text {
  margin: 0 0 12px;
}

.cookie-banner__text a {
  color: inherit;
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  gap: 8px;
}

/* Both buttons identical on purpose (EU rule: declining must be as easy as accepting) */
.cookie-banner__button {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--bs-primary, #1c7430);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.cookie-banner__button:hover {
  background: var(--bs-primary-hover, #165c28);
}

.cookie-banner__button:focus-visible {
  outline: 2px solid #222220;
  outline-offset: 2px;
}

/* Desktop: the filter sidebar (#filter-sidebar, 260px wide, list-view.css) sits on the left, so start just
   right of it instead of covering the keyword search. Collapsed sidebar (app.js sets body.sidebar-collapsed):
   back to the corner. Same 769px breakpoint as responsive.css. */
@media (min-width: 769px) {
  .cookie-banner {
    left: 276px;
  }

  body.sidebar-collapsed .cookie-banner {
    left: 16px;
  }
}

/* Phones: full width along the bottom, with a small margin */
@media (max-width: 575px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
  }
}

