/* Properties Catalog & Interactive Map Split Layout */

.re-split-container {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.re-cards-column {
  flex: 0 0 38%;
  max-width: 38%;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.re-map-column {
  flex: 1;
  position: relative;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.re-card .re-card-media {
  height: 145px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.re-card .re-card-media-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.re-card .re-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.re-card .re-card-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.re-card .re-card-badges-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  pointer-events: none;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.re-card .re-card-badge-pill {
  font-size: 0.75rem;
  height: 1.55em;
  padding: 0 6px;
}
.re-card .re-card-placeholder {
  width: 100%;
  height: 100%;
  color: #475569;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.re-card .re-card-placeholder i {
  font-size: 1.8rem;
  margin-bottom: 4px;
  color: #cbd5e1;
}
.re-card .re-card-media-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.6) 60%, transparent 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  padding: 0.5rem;
}
.re-card .re-card-media-bottom .has-text-grey-light,
.re-card .re-card-media-bottom .has-text-grey,
.re-card .re-card-media-bottom span {
  color: #f8fafc !important;
}
.re-card .re-card-price {
  font-size: 1.1rem;
  font-weight: 700;
}
.re-card .re-card-price-discount {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
}
.re-card .re-card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.re-card .re-card-specs {
  color: #475569;
}
.re-card .re-card-address {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  color: #475569;
}
.re-card .re-card-footer {
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
  gap: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.25rem;
}
.re-card .re-card-footer-meta {
  min-width: 0;
  color: #475569;
}
.re-card .re-card-footer-time {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  color: #475569;
}
.re-card .re-card-btn-view {
  border-radius: 6px;
  padding: 2px 7px;
  height: 24px;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.re-card .re-card-body {
  padding: 0.5rem 0.65rem;
}
.re-card .re-card-title {
  font-size: 0.85rem;
  line-height: 1.25;
}
.re-card .re-card-specs {
  font-size: 0.75rem;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.re-card .re-card-badges {
  font-size: 0.68rem;
  margin-bottom: 0.35rem;
}
.re-card .re-card-footer {
  padding-top: 0.35rem;
  font-size: 0.7rem;
}
.re-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.re-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}
.re-card.is-highlighted {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
}
.re-card.is-viewed {
  opacity: 0.82;
  background: #f8fafc;
}
.re-card.is-viewed .re-card-title a {
  color: #64748b !important;
}
.re-card.is-viewed:hover {
  opacity: 1;
}
.mapboxgl-popup-content {
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid #e2e8f0;
  width: 250px;
}
.mapboxgl-popup-close-button {
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 6px;
  right: 6px;
  z-index: 10;
}
.price-marker {
  background: #ffffff;
  border: 2px solid #2563eb;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease;
}
.price-marker:hover,
.price-marker.is-active {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.15);
  z-index: 10;
}
.price-marker.deal-sale {
  border-color: #16a34a;
}
.price-marker.deal-sale:hover {
  background: #16a34a;
}
.price-marker.deal-daily {
  border-color: #d97706;
}
.price-marker.deal-daily:hover {
  background: #d97706;
}
.map-hover-pin {
  width: 24px;
  height: 24px;
  pointer-events: none;
  position: relative;
}
.map-hover-pin-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.map-hover-pin-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 3px solid #2563eb;
  background: rgba(37, 99, 235, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: mapHoverPulse 1.4s infinite ease-out;
  z-index: 1;
}
@keyframes mapHoverPulse {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Zero double-scrolling desktop styles when map is visible */
@media (min-width: 901px) {
  html.re-split-active,
  body.re-split-active {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }
  body.re-split-active > footer.footer {
    display: none !important;
  }
  body.re-split-active main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.re-split-active .re-page-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
  }
  body.re-split-active .re-filter-toolbar {
    flex-shrink: 0;
  }
  body.re-split-active .re-split-container {
    flex: 1;
    min-height: 0;
    height: 100%;
    margin-bottom: 0;
  }
  body.re-split-active .re-cards-column {
    height: 100%;
    overflow-y: auto;
  }
  body.re-split-active .re-map-column {
    height: 100%;
  }
}

/* Grid Mode (when map is hidden) */
.re-split-container.is-grid-mode {
  display: block !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
}
.is-grid-mode .re-map-column {
  display: none !important;
}
.is-grid-mode .re-cards-column {
  overflow: visible !important;
  height: auto !important;
  padding-right: 0 !important;
  max-width: 100% !important;
}
.is-grid-mode .re-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)) !important;
  gap: 1rem !important;
  margin: 0 !important;
}
.is-grid-mode .re-card-col {
  width: 100% !important;
  padding: 0 !important;
}
.is-grid-mode .re-inner-footer {
  display: none !important;
}

@media (max-width: 900px) {
  .re-split-container {
    display: block;
    height: auto;
  }
  .re-cards-column {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding-right: 0;
    overflow-y: visible;
  }
  .re-map-column {
    height: 380px;
    margin-bottom: 1.5rem;
    position: relative;
    top: 0;
  }
  .mobile-view-map .re-cards-column {
    display: none !important;
  }
  .mobile-view-map .re-map-column {
    display: flex !important;
    flex-direction: column;
    height: calc(100vh - 210px);
    height: calc(100dvh - 210px);
    min-height: 360px;
  }
  .mobile-view-list .re-map-column {
    display: none !important;
  }
  .mobile-view-list .re-cards-column {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .re-filter-toolbar {
    padding: 0.45rem 0.6rem !important;
    margin-bottom: 0.5rem !important;
  }
  .re-deal-pills,
  .re-rooms-price-row {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    gap: 0.35rem !important;
  }
  .re-deal-pills::-webkit-scrollbar,
  .re-rooms-price-row::-webkit-scrollbar {
    display: none;
  }
  .re-deal-pills > *,
  .re-rooms-price-row > * {
    flex-shrink: 0;
  }
  .re-toolbar-controls {
    width: 100%;
    justify-content: flex-start !important;
    gap: 0.35rem !important;
  }
  .re-price-input {
    width: 56px !important;
  }
  .re-search-actions-row {
    width: 100%;
    min-width: 0 !important;
    gap: 0.35rem !important;
  }
  .re-search-actions-row .re-search-control {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

@media (max-width: 600px) {
  .re-card .re-card-media {
    height: 185px !important;
  }
}
.floating-toggle-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  border-radius: 9999px;
}

/* Hybrid Advanced Filters Panel */
.re-advanced-filters-panel {
  display: none;
}
.re-filter-chevron {
  transition: transform 0.2s ease;
  display: inline-block;
}
.re-toggle-pill {
  user-select: none;
  cursor: pointer;
}

/* Desktop: Collapsible inline drawer */
@media (min-width: 901px) {
  .re-advanced-filters-panel.is-open {
    display: block;
    margin-top: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    animation: filterDrawerOpen 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .re-advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .re-filter-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
}

/* Mobile: Native-like bottom sheet modal */
@media (max-width: 900px) {
  .re-advanced-filters-panel {
    display: none !important;
  }
  .re-advanced-filters-panel.is-mobile-open {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1040 !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  .re-advanced-filters-inner {
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.2);
    animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .re-advanced-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
  }
  .re-advanced-filters-body {
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .re-filter-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .re-advanced-filters-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    gap: 0.75rem;
  }
}

@keyframes filterDrawerOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Responsive Property Show Layout */
@media (min-width: 769px) {
  .property-show-grid {
    display: grid;
    grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
    grid-template-areas:
      "gallery sidebar"
      "desc    sidebar";
    gap: 1.5rem;
    align-items: start;
  }
  .property-show-gallery {
    grid-area: gallery;
  }
  .property-show-desc {
    grid-area: desc;
  }
  .property-show-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 1.25rem;
    align-self: start;
  }
}

@media (max-width: 768px) {
  .property-show-grid {
    display: flex;
    flex-direction: column;
  }
  .property-show-gallery {
    order: 1;
  }
  .property-show-sidebar {
    order: 2;
  }
  .property-show-desc {
    order: 3;
  }
  .property-thumbnails-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 6px;
    margin-top: 0.5rem !important;
  }
  .property-thumbnails-row .column {
    flex: 0 0 68px !important;
    width: 68px !important;
    padding: 0 !important;
  }
}

/* Quick Highlights Strip */
.property-highlights-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.property-highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.825rem;
  color: #1e293b;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.property-highlight-chip i {
  color: #64748b;
  font-size: 0.85rem;
}

.property-highlight-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Card Boxes */
.property-card-box {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Favorites System & Guest Toast */
.favorite-toggle-btn {
  position: relative;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  z-index: 5;
  vertical-align: middle;
}

.favorite-toggle-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
}

.favorite-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(15, 23, 42, 0.85);
}

.favorite-toggle-btn.is-favorited {
  background: #ffffff !important;
  color: #ef4444 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.favorite-show-btn.is-favorited {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
}

@keyframes heartBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.heart-bounce {
  animation: heartBounce 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.favorites-guest-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideUpToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 420px;
  border: 1px solid #334155;
}

@keyframes slideUpToast {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .favorites-guest-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

.fav-map-price-marker {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #2563eb;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.fav-map-price-marker:hover, .fav-map-price-marker.is-active {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
  z-index: 100;
}

.card-highlight-pulse {
  animation: pulseHighlight 2s ease-out;
}

@keyframes pulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); border-color: #2563eb; }
  50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); border-color: #2563eb; }
  100% { box-shadow: none; }
}

/* Building Intel Accordion */
.building-intel-accordion details summary {
  cursor: pointer;
  outline: none;
}
.building-intel-accordion details summary::-webkit-details-marker {
  display: none;
}
.building-intel-accordion details summary .collapse-indicator i {
  transition: transform 0.2s ease;
}
.building-intel-accordion details[open] summary .collapse-indicator i {
  transform: rotate(180deg);
}

.rotate-180 {
  transform: rotate(180deg);
}

/* Accessibility & Mobile Touch Targets */
@media (max-width: 768px) {
  .re-filter-bar .buttons .button,
  .re-filter-bar .button.is-small,
  .re-filter-bar .input.is-small {
    min-height: 38px;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
}

.re-card .has-text-grey,
#re-cards-results h2.has-text-grey {
  color: #475569 !important; /* WCAG AA 5.8:1 */
}

/* District Selector Schematic Modal */
.schematic-map-container {
  display: flex;
  position: relative;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
}
.schematic-sea-strip {
  width: 38px;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 50%, #075985 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
}
.sea-label {
  transform: rotate(-90deg);
  white-space: nowrap;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  opacity: 0.9;
}
.schematic-land-area {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 520px;
}
.schematic-zone-header {
  margin-top: 4px;
  margin-bottom: 2px;
}
.schematic-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
}
.schematic-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  position: relative;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 58px;
}
.schematic-card:hover {
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}
.schematic-card.is-selected {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}
.schematic-card-checkbox {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: transparent;
  transition: all 0.15s;
}
.schematic-card.is-selected .schematic-card-checkbox {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.schematic-icon {
  font-size: 0.8rem;
  color: #2563eb;
  width: 14px;
  display: inline-block;
}
.schematic-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
  padding-right: 14px;
}
.schematic-desc {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.2;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.district-presets-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  padding: 0.75rem;
}

.district-map-col {
  border-right: 1px solid var(--border-default);
}

.district-list-col {
  background-color: var(--bg-surface);
}

.district-list-scrollable {
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}

.district-geo-col {
  border-right: 1px solid var(--border-default);
  background-color: var(--bg-page);
}

.district-geo-svg {
  width: 100%;
  height: auto;
  max-height: 410px;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background-color: #dbeafe;

  &.is-land-bg {
    background-color: #e8f3e8;
  }
}

html[data-theme="dark"] .district-geo-svg {
  background-color: #0c1f38;

  &.is-land-bg {
    background-color: #132234;
  }
}

.district-geo-water {
  fill: #bfdbfe;
  stroke: #60a5fa;
  stroke-width: 1;
}

html[data-theme="dark"] .district-geo-water {
  fill: #0f294a;
  stroke: #2563eb;
}

.district-geo-land {
  fill: #e8f3e8;
  stroke: #93c5fd;
  stroke-width: 1.5;
}

html[data-theme="dark"] .district-geo-land {
  fill: #132234;
  stroke: #1e40af;
}

.district-geo-river {
  fill: none;
  stroke: #93c5fd;
  stroke-width: 2.5;
  stroke-linecap: round;
}

html[data-theme="dark"] .district-geo-river {
  stroke: #1d4ed8;
}

.district-geo-sea-label {
  fill: #1d4ed8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

html[data-theme="dark"] .district-geo-sea-label {
  fill: #7dd3fc;
}

.district-svg-region {
  cursor: pointer;

  & polygon {
    fill: rgba(37, 99, 235, 0.14);
    stroke: rgba(37, 99, 235, 0.55);
    stroke-width: 1;
    stroke-linejoin: round;
    transition: fill 0.15s ease, stroke 0.15s ease;
  }

  &.is-suburb polygon {
    fill: rgba(16, 185, 129, 0.16);
    stroke: rgba(5, 150, 105, 0.55);
  }

  & text {
    fill: var(--text-primary);
    font-size: 7.5px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
  }

  &:hover polygon {
    fill: rgba(37, 99, 235, 0.3);
    stroke: var(--accent);
    stroke-width: 1.5;
  }

  &.is-suburb:hover polygon {
    fill: rgba(16, 185, 129, 0.32);
    stroke: #059669;
  }

  &.is-selected polygon,
  &.is-suburb.is-selected polygon {
    fill: rgba(37, 99, 235, 0.6);
    stroke: #1d4ed8;
    stroke-width: 1.75;
  }

  &.is-selected text {
    fill: #ffffff;
    font-weight: 700;
  }
}

.district-geo-landmark {
  font-size: 10px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.district-geo-mountain {
  fill: rgba(100, 116, 139, 0.16);
  stroke: rgba(100, 116, 139, 0.35);
  stroke-width: 1;
  stroke-linejoin: round;
  pointer-events: none;
}

html[data-theme="dark"] .district-geo-mountain {
  fill: rgba(148, 163, 184, 0.14);
  stroke: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] .district-svg-region {
  & polygon {
    fill: rgba(56, 189, 248, 0.16);
    stroke: rgba(56, 189, 248, 0.45);
  }

  &.is-suburb polygon {
    fill: rgba(52, 211, 153, 0.14);
    stroke: rgba(52, 211, 153, 0.45);
  }

  &:hover polygon {
    fill: rgba(56, 189, 248, 0.32);
    stroke: #38bdf8;
  }

  &.is-suburb:hover polygon {
    fill: rgba(52, 211, 153, 0.3);
    stroke: #34d399;
  }

  &.is-selected polygon,
  &.is-suburb.is-selected polygon {
    fill: rgba(37, 99, 235, 0.78);
    stroke: #60a5fa;
  }
}

@media (max-width: 768px) {
  .district-geo-col {
    border-right: none;
    border-bottom: 1px solid var(--border-default);
  }

  .district-geo-svg {
    max-height: 260px;
  }

  .district-list-scrollable {
    max-height: 240px;
  }
}

.district-list-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: all 0.15s;

  &:hover {
    background-color: var(--bg-page);
  }

  &.is-selected {
    background-color: var(--accent-soft);
    border-color: var(--accent);
  }
}

.district-list-label {
  cursor: pointer;
  gap: 0.5rem;
  width: 100%;
}

.district-list-icon {
  color: var(--accent);
}

.district-list-desc {
  font-size: 0.75rem;
  line-height: 1.25;
}

.preset-btn {
  font-weight: 500;
  border: 1px solid var(--border-default);
  background-color: var(--bg-surface);
  color: var(--text-primary);

  &:hover {
    background-color: var(--bg-subtle);
    color: var(--text-primary);
  }
}
.preset-btn:hover {
  border-color: #3b82f6;
  color: #2563eb;
}

/* Building Page Components */
.building-header-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl); /* 16px */
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.spec-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); /* 12px */
  padding: 0.85rem;
  text-align: center;
}

.spec-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);

  &.is-accent { color: var(--accent); }
  &.is-info { color: var(--brand-telegram); }
  &.is-success { color: var(--success); }
  &.is-warning { color: var(--warning); }
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Sidebar Unit Offers Strip (cheaper same-intent + other-intent offers by other sellers) */
.unit-offers-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-3);
}

.unit-offer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 0.8125rem;
  line-height: 1.3;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, background-color 0.15s ease;

  &:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
  }

  &.is-cheaper {
    background-color: var(--success-soft);
    border-color: var(--success-border);
    color: var(--success-text);

    &:hover {
      color: var(--success-text);
    }
  }
}

.unit-offer-row-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.unit-offer-row-title {
  font-weight: 600;
  color: inherit;
}

.unit-offer-row-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.unit-offer-row.is-cheaper .unit-offer-row-meta {
  color: var(--success-text);
  opacity: 0.88;
}

.unit-offer-row-cta {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--accent);
}

.unit-offer-row.is-cheaper .unit-offer-row-cta {
  color: var(--success-text);
}

/* Sidebar Intent Switcher Tabs (Rent vs Sale segmented control) */
.sidebar-intent-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.sidebar-intent-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;

  &:hover {
    color: var(--text-primary);
  }

  &.is-active {
    background-color: var(--bg-surface);
    border-color: var(--border-default);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
  }
}

.sidebar-intent-tab-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.sidebar-intent-tab.is-active .sidebar-intent-tab-label {
  color: var(--accent);
}

.sidebar-intent-tab-price {
  font-size: 0.875rem;
  font-weight: 800;
  color: inherit;
}

/* Building & Complex Specifications Bullet List */
.building-specs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 var(--space-3) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;

  & li {
    line-height: 1.45;
  }

  & strong {
    color: var(--text-primary);
    font-weight: 600;
  }
}

@media (max-width: 600px) {
  .building-specs-list {
    grid-template-columns: 1fr;
  }
}




