/* ---------- Layout ---------- */
.hsl-wrap {
  display: grid;
  grid-template-columns: 480px 1fr; /* wider sidebar */
  gap: 0;
  min-height: var(--hsl-height, 600px);
  border: 1px solid #e5e7eb;
  background: #fff;
}
@media (max-width: 900px) {
  .hsl-wrap { grid-template-columns: 1fr; }
  .hsl-map { height: 360px; }
}
.hsl-map { width: 100%; height: var(--hsl-height, 600px); }
.hsl-error { color: #b91c1c; }

/* ---------- Sidebar ---------- */
.hsl-sidebar {
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: auto;
  border-right: 1px solid #e5e7eb;
  background: #fafafa;
}
.hsl-list {
  flex: 1;
  overflow-y: auto;
  max-height: calc(var(--hsl-height, 600px) - 120px);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Search */
.hsl-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
  align-items: stretch; /* ensure both children stretch to equal height */
}

.hsl-search input,
.hsl-search button,
#hsl-geolocate {
  height: 44px;            /* consistent height */
  box-sizing: border-box;  /* include border/padding in height */
}

.hsl-search input {
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  width: 100%;
  font-size: 14px;
}

.hsl-search button,
#hsl-geolocate {
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: #DF771C;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
text-transform: uppercase;
  white-space: nowrap;
}


/* Controls */
.hsl-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

/* ---------- Cards (left list) ---------- */
.hsl-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
  scroll-margin: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.hsl-card-active {
  border-color: #DF771C;
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(223, 119, 28, 0.2);
}
.hsl-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.hsl-card-header .hsl-number {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  background: #DF771C;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  margin-right: 8px;
  border-radius: 50%;
}
.hsl-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}
.hsl-address-hours {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.hsl-address p,
.hsl-hours p {
  margin: 0 0 2px;   /* tighter address spacing */
  font-size: 14px;
}
.hsl-hours { text-align: right; }

/* Footer buttons smaller */
.hsl-card-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.hsl-card-footer .hsl-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;            /* match geolocate button height */
  padding: 0 16px;
  background: #DF771C;
  border: none;
  border-radius: 8px;
  text-align: center;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}

.hsl-feature-block,
.hsl-services-block,
.hsl-amenities-block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
}
.hsl-feature-block + .hsl-feature-block,
.hsl-services-block + .hsl-amenities-block,
.hsl-amenities-block + .hsl-services-block {
  border-top: none;
}
.hsl-feature-toggle,
.hsl-services-toggle,
.hsl-amenities-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.hsl-feature-toggle:focus,
.hsl-services-toggle:focus,
.hsl-amenities-toggle:focus {
  outline: 2px solid #DF771C;
  outline-offset: 2px;
}
.hsl-feature-toggle-text,
.hsl-services-toggle-text,
.hsl-amenities-toggle-text {
  order: 1;
}
.hsl-feature-toggle-icon,
.hsl-services-toggle-icon,
.hsl-amenities-toggle-icon {
  order: 2;
  margin-left: auto;
}
.hsl-feature-toggle-icon::before,
.hsl-services-toggle-icon::before,
.hsl-amenities-toggle-icon::before {
  content: '\f0d7'; /* Font Awesome caret-down */
  display: inline-block;
  font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free', 'Font Awesome 5 Pro', 'Font Awesome 6 Pro', 'Font Awesome 4', sans-serif;
  font-weight: 900;
  font-style: normal;
  speak: none;
  font-size: 14px;
  line-height: 1;
}
.hsl-feature-toggle-icon.is-expanded::before,
.hsl-services-toggle-icon.is-expanded::before,
.hsl-amenities-toggle-icon.is-expanded::before {
  content: '\f0d8'; /* Font Awesome caret-up */
}
.hsl-feature-list,
.hsl-services-list,
.hsl-amenities-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}
.hsl-feature-list[hidden],
.hsl-services-list[hidden],
.hsl-amenities-list[hidden] {
  display: none !important;
}
.hsl-feature-item,
.hsl-service-item,
.hsl-amenity-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1f2937;
  width: 100%;
}
.hsl-feature-icon,
.hsl-service-icon,
.hsl-amenity-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hsl-feature-icon-img,
.hsl-service-icon-img,
.hsl-amenity-icon-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.hsl-feature-label,
.hsl-service-label,
.hsl-amenity-label {
  display: inline-block;
}
.hsl-service-label,
.hsl-amenity-label {
  display: inline-block;
  font-size: 12px;
}
.hsl-feature-link,
.hsl-feature-label a {
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
}
.hsl-feature-link:hover,
.hsl-feature-link:focus,
.hsl-feature-label a:hover,
.hsl-feature-label a:focus {
  text-decoration: none;
}
.mg-store-services-block,
.mg-store-amenities-block {
  margin: 1rem 0;
}

.hsl-infowindow .hsl-feature-list,
.hsl-infowindow .hsl-services-list,
.hsl-infowindow .hsl-amenities-list {
  grid-template-columns: 1fr;
}

/* Hide feature blocks inside the popup but keep markup for potential reuse */
.hsl-infowindow .hsl-feature-block,
.hsl-infowindow .hsl-services-block,
.hsl-infowindow .hsl-amenities-block {
  display: none;
}

@media (max-width: 640px) {
  .hsl-services-list {
    grid-template-columns: 1fr;
  }
}

/* Phone links */
.hsl-card a[href^="tel:"],
.hsl-infowindow a[href^="tel:"] {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: underline; /* underline per request */
}

/* ---------- InfoWindow (map popup) ---------- */
/* Strip Google defaults that add top spacing */
.gm-style-iw,
.gm-style-iw-ch,
.gm-style-iw-d,
.gm-style-iw-c {
  padding: 0 !important;
  margin: 0 !important;
}
.gm-style-iw { overflow: visible !important; }

/* Override Google Maps InfoWindow close button */
.gm-style-iw button.gm-ui-hover-effect {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

/* Fix the inner span so the X glyph centers */
.gm-style-iw button.gm-ui-hover-effect span {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;   /* remove Google’s default 12px offset */
  padding: 0 !important;
  display: block !important;
  mask-size: contain !important;
  mask-repeat: no-repeat !important;
  mask-position: center !important;
  background-color: #000 !important; /* ensures X shows black */
}

/* Our popup content, padded so it never sits under the X */
.hsl-infowindow {
  position: relative;
  padding: 8px 36px 8px 12px; /* right pad for the X */
  font-family: inherit;
  background: #fff;
}
.hsl-infowindow-header { display: block; }
.hsl-infowindow-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}
.hsl-infowindow-body p {
  margin: 2px 0;
  font-size: 14px;
}

/* Popup buttons */
.hsl-infowindow-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.hsl-infowindow .hsl-btn.small {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  background: #DF771C;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 0;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
