/* Filter Buttons Section */
#pn-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}
#pn-filters .pn-filter {
  padding: 6px 12px;
  font-size: 14px;
  margin: 0 6px 10px 0;
  border-radius: 6px;
  background: #161616;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
#pn-filters .pn-filter:hover {
  background: #444;
}
#pn-filters .pn-filter.active {
  background-color: #2563eb;
  color: white;
}

/* Map Layout Container */
.pn-map-panel-center {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.pn-map-panel-wrapper {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.pn-map-container {
  flex-grow: 1;
}
#pn-map,
#pn-global-map {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* Side Panel for Nearby Places */
.pn-side-panel {
  width: 360px;
  height: 500px;
  background: #f9f9f9b6;
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid #ddd;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}
.pn-side-panel h3 {
  margin-top: 0;
  margin-bottom: 10px;
}
h4 {
  margin: 12px 0 4px;
  font-size: 15px;
  color: #333;
  font-weight: 1000;
}
strong {
  font-weight: 1000;
}
.pn-side-panel ul {
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}
.pn-side-panel ul li {
  font-size: 14px;
  margin-bottom: 6px;
}

/* POI Item Styled as a Button */
.pn-poi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  color: #1f2937;
  border: 1px solid #d1d5db;
  font-weight: 500;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.pn-poi-item:hover {
  background: #e2e8f0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}
.pn-poi-item.active-poi {
  background-color: #4064f5;
  color: white;
  border-color: #2563eb;
}
.pn-poi-item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
}

/* Responsive Layout: Touch Devices */
@media (max-width: 768px) {
  .pn-poi-item {
    padding: 12px;
    font-size: 15px;
    gap: 12px;
  }
  .pn-map-panel-wrapper {
    flex-direction: column;
  }
  .pn-map-container,
  .pn-side-panel {
    width: 100%;
  }
  #pn-map,
  #pn-global-map {
    height: 50vh;
  }
  .pn-side-panel {
    margin-top: 1rem;
    max-height: 300px;
  }
}

/* Sticky Panel for Desktop */
@media (min-width: 769px) {
  .pn-side-panel {
    position: sticky;
    top: 2rem;
  }
}

.poi-meta-horizontal {
  display: grid;
  justify-content: 1fr 1fr;
  margin-top: 4px;
  font-size: 13px;
  color: black;
  font-weight: 500;
  gap: 12px;
  flex-wrap: wrap;
}
.poi-meta-horizontal span {
  white-space: nowrap;
  min-width: 100px;
}

/* === GLOBAL MAP SPECIFIC STYLING FIXES === */
#pn-global-condo-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden !important;
  max-height: 420px;
  padding: 0;
  margin: 0;
  list-style: none;
  word-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
}
#pn-global-condo-list li.pn-poi-item {
  background: #f1f5f9;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 18px;
  column-gap: 0.5rem;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  white-space: normal;
  overflow: hidden;
}
#pn-global-condo-list li.pn-poi-item:hover {
  background-color: #e2e8f0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
#pn-global-condo-list li.pn-poi-item.active-poi {
  background-color: #4064f5;
  color: white;
  border-color: #2563eb;
}

/* === GLOBAL MAP Search Input Cleanup === */
#pn-side-panel input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  overflow-x: hidden;
}

/* === FIX: Align Global Map Side Panel Height With Map === */
.pn-map-panel-wrapper {
  align-items: stretch;
}
.pn-side-panel.global-map-panel {
  height: auto;
  max-height: none;
  overflow-y: auto;
  position: static;
}
#pn-side-panel.global-map-panel {
  display: flex;
  flex-direction: column;
}
#pn-side-panel.global-map-panel h3 {
  flex-shrink: 0;
}
#pn-side-panel.global-map-panel input[type="text"] {
  flex-shrink: 0;
}
#pn-global-condo-list {
  flex-grow: 1;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

h3 {
  font-size: 30px;
  font-weight: 500;
}

/* === GLOBAL MAP: Proper scrollable list inside fixed-height side panel === */
#pn-condo-list-wrapper {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 50px;
}
#pn-global-form {
  padding-bottom: 50px;
}

/* === ENHANCEMENT: Proper global scroll sync between map & side panel === */
.pn-side-panel.global-map-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 600px; /* Adjust as needed */
  overflow-y: auto;
}

#pn-global-condo-list {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  word-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
}

/* this is section is the style of map settings list */

/* map settings list table */
  
#pn-condo-list-table th,
#pn-condo-list-table td {
  width: 20%;
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  border: none;
}

#pn-condo-list-table th:nth-child(4),
#pn-condo-list-table td:nth-child(4),
#pn-condo-list-table th:nth-child(5),
#pn-condo-list-table td:nth-child(5) {
  width: 10%; /* View and Remove columns narrower */
  text-align: center;
}

/* map settings list buttons */
.pn-reset-btn {
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
  width: 100%;
}

.pn-search-box {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* FIX: Remove Google Maps UI Hover Effect */
.gm-style-iw-chr {
  display: none;
}