/**
 * Half-Map Layout Styles for Category Page
 * Toggle between full-width listing and split view with map
 */

/* Container wrapper */
.danhmuc-map-wrapper {
  display: flex;
  flex-direction: row-reverse;
  min-height: calc(100vh - 200px);
}

/* Map container - hidden by default */
.danhmuc-map-container {
  position: relative;
  display: none;
  overflow: hidden;
}

/* Content area */
.danhmuc-content-area {
  width: 100%;
}

/* Active state: show map */
.map-view-active .danhmuc-map-container {
  display: block;
  width: 60%;
  height: calc(100vh - 80px);
  position: sticky;
  top: 80px;
}

/* Search bar repositioning when map is active */
.map-view-active ~ .main-content,
body:has(.map-view-active) .main-content {
  /* Content flows normally */
}

/* When map active, search section moves into content flow */
body:has(.map-view-active) section.style-2 {
  position: fixed;
  top: 78px;
  left: 0; /* Align with content area on the left */
  width: 40%;
  max-width: 100%; /* Ensure it doesn't overflow on small screens */
  min-width: 320px; /* Minimum width for usability */
  z-index: 100;
  background: #fff;
  padding: 10px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body:has(.map-view-active) section.style-2 .tf-container {
  max-width: 100%;
  padding: 0;
}

body:has(.map-view-active) section.style-2 .property-search-bar {
  margin: 0;
}

/* Adjust content area padding when search is fixed above it */
body:has(.map-view-active) .danhmuc-content-area {
  padding-top: 90px; /* Space for fixed search bar */
}

/* Fix filter width when map is active */
body:has(.map-view-active) #advanced-filters-content .search-bar-field-box-content {
  width: 320px;
  max-width: calc(100vw - 60px);
  right: 0;
  left: auto;
}

/* Screens ≤1366px: Move search bar to full-width row on top */
@media (max-width: 1366px) {
  /* Search bar becomes full width and sits on top */
  body:has(.map-view-active) section.style-2 {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    width: 100% !important;
    z-index: 100;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  /* Override flex-direction: Content LEFT, Map RIGHT */
  body:has(.map-view-active) .danhmuc-map-wrapper {
    margin-top: 140px; /* Increase space for fixed search bar */
    flex-direction: row !important; /* Override row-reverse */
  }
  
  /* Map is on RIGHT */
  body:has(.map-view-active) .danhmuc-map-container {
    width: 50%;
    margin-top: 0;
    position: fixed;
    top: 158px; /* Add more space from top - not too close */
    right: 0; /* Map on RIGHT side */
    height: calc(100vh - 158px);
    padding-top: 15px; /* Add padding inside map container */
    z-index: 50; /* Below search bar */
  }
  
  /* Content is on LEFT */
  body:has(.map-view-active) .danhmuc-content-area {
    width: 50%;
    max-width: 50%; /* Prevent overflow */
    padding-top: 0;
    padding-right: 15px; /* Add gap between content and map */
    margin-left: 0; /* No margin needed */
  }
  
  /* Ensure content doesn't overflow into map area */
  body:has(.map-view-active) .danhmuc-content-area > * {
    max-width: 100%;
  }
}


/* Map container starts below fixed search bar */
body:has(.map-view-active) .danhmuc-map-container {
  margin-top: 0;
}

.map-view-active .danhmuc-content-area {
  width: 40%;
}

/* Adjust grid layout when map is active */
.map-view-active .tf-grid-layout.lg-col-3 {
  grid-template-columns: repeat(2, 1fr);
}

.map-view-active .tf-grid-layout.lg-col-2 {
  grid-template-columns: 1fr;
}

/* Hide sidebar when map is active for more space */
.map-view-active .col-lg-3.no_padding {
  display: none;
}

.map-view-active .col-lg-9 {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
}

/* Map element */
#danhmuc-map {
  width: 100%;
  height: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Toggle button */
.btn-map-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.btn-map-toggle:hover {
  border-color: var(--color-primary, #F1913D);
  color: var(--color-primary, #F1913D);
  background: rgba(241, 145, 61, 0.05);
}

.btn-map-toggle.active {
  border-color: var(--color-primary, #F1913D);
  color: #fff;
  background: var(--color-primary, #F1913D);
}

/* Hide toggle button when map is active (use close button inside map instead) */
.map-view-active ~ * .btn-map-toggle,
body:has(.map-view-active) .btn-map-toggle:not(.is-loading) {
  display: none;
}

.btn-map-toggle.is-loading {
    display: flex !important; /* Keep visible during load */
    pointer-events: none;
    opacity: 0.8;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    margin-right: 8px;
    display: none;
}

.btn-map-toggle.is-loading .btn-spinner {
    display: block;
}

.btn-map-toggle.is-loading .btn-icon-svg {
    display: none;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-map-toggle svg {
  flex-shrink: 0;
}

/* Map loading state */
.danhmuc-map-container.loading::after,
.danhmuc-map-container.loading::before {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
}

/* .danhmuc-map-container.loading::after {
  content: '';
  top: calc(50% - 40px);
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-primary, #F1913D);
  border-radius: 50%;
  animation: map-spin 1s linear infinite;
} */

.danhmuc-map-container.loading::before {
  content: 'Đang tải bản đồ...';
  top: calc(50% + 25px);
  color: #666;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.danhmuc-map-container.loading {
  background: #fcfcfc;
  position: relative;
  min-height: 300px;
}

@keyframes map-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =================================================================== */
/* NEW POPUP STYLES - Property & Project Popups */
/* =================================================================== */

/* Property Popup (BĐS riêng lẻ) */
.map-popup-property {
  position: relative;
  max-width: 450px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.map-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.map-popup-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.map-popup-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.map-popup-content {
  display: flex;
  gap: 12px;
  padding: 12px;
}

.map-popup-image {
  width: 100px;
  min-width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}

.map-popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-popup-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.map-popup-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.map-popup-price {
  font-size: 15px;
  font-weight: 700;
  color: #e74c3c;
  margin: 0;
}

.map-popup-area {
  font-size: 13px;
  color: #666;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-popup-area svg {
  opacity: 0.6;
}

/* Project Popup (Dự án) */
.map-popup-project {
  position: relative;
  width: 360px;
  max-width: 90vw;
  height: auto;
  max-height: 500px;
  background: #fff;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project-header {
  position: sticky;
  top: 0;
  z-index: 10;
  position: -webkit-sticky;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #333;
  overflow: hidden; /* Prevent content spill during shrink */
}

.project-header.is-shrunk {
  height: 60px;
}

.project-header.is-shrunk .project-header-overlay {
  flex-direction: row;
  justify-content: flex-start;
  padding: 0 50px 0 15px; 
  background: rgba(0,0,0,0.9);
}

.project-header.is-shrunk .project-header-icon,
.project-header.is-shrunk .project-price,
.project-header.is-shrunk .btn-view-project,
.project-header.is-shrunk .vip-badge {
  opacity: 0;
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.project-header.is-shrunk .project-title {
  margin: 0;
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  transition: font-size 0.3s ease, margin 0.3s ease;
}

.project-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  transition: padding 0.3s ease, background 0.3s ease, flex-direction 0.3s ease;
}

.project-header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.project-header-icon svg {
  color: #fff;
}

.project-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
}

.project-price {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-price svg {
  opacity: 0.8;
}

.btn-view-project {
  display: inline-block;
  padding: 8px 20px;
  background: #fff;
  color: #333;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-view-project:hover {
  background: var(--color-primary, #F1913D);
  color: #fff;
  transform: scale(1.05);
}

.project-property-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.project-property-item:hover {
  background: #f8f8f8;
}

.project-property-item:last-child {
  border-bottom: none;
}

.vip-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
  letter-spacing: 0.5px;
}

.project-property-item img,
.project-property-item .no-image {
  width: 90px;
  min-width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.project-property-item .no-image {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}

.prop-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prop-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prop-price {
  font-size: 14px;
  font-weight: 700;
  color: #e74c3c;
  margin: 0;
}

.price-per-m2 {
  font-size: 11px;
  font-weight: 400;
  color: #999;
}

.prop-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #666;
}

.prop-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prop-meta svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.btn-see-all-props {
  display: block;
  padding: 12px;
  text-align: center;
  background: #f8f8f8;
  color: var(--color-primary, #F1913D);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid #eee;
  transition: background 0.2s;
}

.btn-see-all-props:hover {
  background: #f0f0f0;
}

/* Loading state for marker popup */
.map-popup {
  padding: 16px 20px;
  font-size: 14px;
  color: #666;
  text-align: center;
  min-width: 120px;
}

.map-popup.project-popup {
  min-width: 140px;
}

/* Google Maps InfoWindow overrides */
.gm-style-iw-ch {
  padding-top: 0 !important;
}

.gm-style-iw {
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: visible !important;
  background: #fff !important;
}

.gm-style-iw-d {
  overflow: visible !important;
  max-height: none !important;
  padding: 0 !important;
}

/* Ensure InfoWindow is visible */
.gm-style .gm-style-iw-c {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 9999 !important;
}

.gm-style-iw-a {
  z-index: 9999 !important;
  width: auto !important;
  height: auto !important;
}

.gm-ui-hover-effect {
  display: none !important; /* Hide default close button */
}

/* Ensure InfoWindow container allows absolute positioning */
.gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: visible !important;
}

.gm-style-iw-tc {
  display: none;
}

/* Google Maps consent dialog responsive fix */
.gm-style .dismissButton,
.gm-style [role="dialog"] {
  max-width: calc(100vw - 30px) !important;
}

.gm-style [role="dialog"] {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  min-width: 360px !important;
}

@media (max-width: 576px) {
  .gm-style [role="dialog"] {
    min-width: 260px !important;
    font-size: 13px !important;
  }

  .gm-style [role="dialog"] button {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
  .gm-style [role="dialog"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 260px !important;
  }
  /* Fix filter width when map is active on mobile */
  body:has(.map-view-active) #advanced-filters-content .search-bar-field-box-content {
    max-width: calc(100vw - 30px) !important;
    width: auto !important;
  }
  
  /* Ensure dropdown stays within viewport */
  body:has(.map-view-active) .search-bar-field-box-content {
    right: 15px !important;
    left: auto !important;
  }
}

/* Highlighted marker */
.marker-highlighted {
  z-index: 1000 !important;
}

/* Tablet: responsive filter adjustments */
@media (max-width: 991px) and (min-width: 577px) {
  /* Adjust search bar width to fit viewport */
  body:has(.map-view-active) section.style-2 {
    width: 100%;
    max-width: 100%;
  }
  
  /* Make filter dropdown responsive */
  body:has(.map-view-active) #advanced-filters-content .search-bar-field-box-content {
    max-width: calc(100vw - 40px) !important;
    width: auto !important;
    right: 20px !important;
    left: auto !important;
  }
}

/* Mobile: half-top layout */
@media (max-width: 991px) {
  .danhmuc-map-wrapper {
    flex-direction: column;
  }

  .map-view-active .danhmuc-map-container {
    width: 100%;
    height: 40vh;
    min-height: 280px;
    position: relative;
    top: 0;
    padding: 0 15px 15px;
    overflow: visible;
  }

  .map-view-active .danhmuc-content-area {
    width: 100%;
  }

  /* Reset search bar position on mobile - back to normal flow */
  body:has(.map-view-active) section.style-2 {
    position: static;
    width: 100%;
    top: auto;
    right: auto;
    box-shadow: none;
    padding: 0;
  }

  body:has(.map-view-active) section.style-2 .tf-container {
    max-width: none;
    padding: 0 15px;
  }

  body:has(.map-view-active) section.style-2 .property-search-bar {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  /* Reset content area padding on mobile */
  body:has(.map-view-active) .danhmuc-content-area {
    padding-top: 0;
  }

  /* Reset grid for mobile */
  .map-view-active .tf-grid-layout.lg-col-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Show sidebar on mobile */
  .map-view-active .col-lg-3.no_padding {
    display: block;
  }

  .map-view-active .col-lg-9 {
    width: auto;
    max-width: none;
    flex: none;
  }

  /* Button styling for mobile */
  .btn-map-toggle {
    padding: 8px 12px;
    font-size: 13px;
  }

  .btn-map-toggle span {
    display: none;
  }

  /* Google Maps consent dialog fix for mobile */
  #danhmuc-map {
    overflow: visible;
  }

  /* Google consent popup responsive fix */
  .gm-style iframe + div,
  .gm-style > div > div:last-child {
    max-width: 100% !important;
  }

  /* Popup responsive */
  .map-popup-project {
    width: 320px;
  }

  .project-header {
    height: 140px;
  }

  .map-popup-project {
    max-height: 60vh;
  }
}

/* Small mobile */
@media (max-width: 576px) {
  body:has(.map-view-active) section.style-2 .tf-container {
    max-width: 100%;
  }
  .map-view-active .col-lg-9 {
    width: 100%;
  }
  .map-view-active .danhmuc-map-container {
    height: 35vh;
    min-height: 240px;
  }

  .map-view-active .tf-grid-layout.lg-col-3,
  .map-view-active .tf-grid-layout.md-col-2 {
    grid-template-columns: 1fr;
  }

  .map-popup-property,
  .map-popup-project {
    width: 280px;
  }

  .map-popup-image {
    width: 80px;
    min-width: 80px;
    height: 80px;
  }

  .project-property-item img,
  .project-property-item .no-image {
    width: 70px;
    min-width: 70px;
    height: 60px;
  }
}

/* Mobile grid fix - ensure proper columns on small screens */
@media (max-width: 767px) {
  .danhmuc-content-area .tf-grid-layout.lg-col-3.md-col-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .danhmuc-content-area .tf-grid-layout.lg-col-3.md-col-2 {
    grid-template-columns: 1fr;
  }

  .danhmuc-content-area .tf-grid-layout {
    gap: 16px;
  }

  /* Ensure property cards don't overflow */
  .danhmuc-content-area .box-house {
    max-width: 100%;
  }

  .danhmuc-content-area .box-house .image-wrap img {
    width: 100%;
    height: auto;
  }
}

/* No results state */
.danhmuc-map-container .no-markers {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  text-align: center;
  padding: 20px;
}

.danhmuc-map-container .no-markers svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.danhmuc-map-container .no-markers p {
  margin: 0;
  font-size: 14px;
}

/* Close button inside map */
.map-close-btn {
  position: absolute;
  top: 9px;
  right: 70px;
  z-index: 10;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.map-close-btn:hover {
  background: var(--color-primary, #F1913D);
}

.map-close-btn:hover svg {
  stroke: #fff;
}

.map-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: #666;
  transition: stroke 0.2s ease;
}

/* Responsive close button */
@media (max-width: 991px) {
  .map-close-btn {
    top: 8px;
    right: 60px;
    width: 32px;
    height: 32px;
  }

  .map-close-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Cluster popup styles */
.map-cluster-popup {
  max-width: 300px;
}

.cluster-header {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.cluster-list {
  max-height: 240px;
  overflow-y: auto;
}

.cluster-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s ease;
}

.cluster-item:last-child {
  border-bottom: none;
}

.cluster-item:hover {
  background: #f5f5f5;
}

.cluster-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cluster-item-info {
  flex: 1;
  min-width: 0;
}

.cluster-item-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.cluster-item-price {
  color: var(--color-primary, #F1913D);
  font-weight: 600;
  font-size: 13px;
}

.cluster-more {
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  border-top: 1px solid #eee;
}

/* Map AJAX loading overlay */
#map-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}

#map-loading-overlay .map-loading-content {
  text-align: center;
  background: #fff;
  padding: 30px 50px;
  border-radius: 12px;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#map-loading-overlay .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
  color: var(--color-primary, #F1913D) !important;
}

#map-loading-overlay p {
  margin: 15px 0 0;
  font-size: 15px;
  color: #666;
}

/* Toggle button for expanding project properties list */
.btn-toggle-props {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  background: #f8f8f8;
  color: var(--color-primary, #F1913D);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-top: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-toggle-props:hover {
  background: #f0f0f0;
}

/* Project properties hidden section */
.project-properties-hidden {
  transition: all 0.3s ease;
}

/* Search this area button */
.search-area-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(20px);
  opacity: 0;
  visibility: hidden;
  
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  
  background: #fff;
  color: #333;
  border: none;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 1000;
  
  transition: all 0.3s ease;
}

.search-area-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) translateY(0);
}

.search-area-btn:hover {
  background: var(--color-primary, #F1913D);
  color: #fff;
  box-shadow: 0 6px 20px rgba(241, 145, 61, 0.4);
  transform: translate(-50%, -50%) translateY(-2px);
}

.search-area-btn svg {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .search-area-btn {
    font-size: 13px;
    padding: 10px 20px;
  }
}

/* Map area search loading overlay */
.map-search-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.map-search-loading-overlay .loading-content {
  text-align: center;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.map-search-loading-overlay .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

.map-search-loading-overlay p {
  margin: 0;
  font-size: 15px;
  color: #666;
  font-weight: 500;
}
