/* Header */
.site-header { 
  background: #000000; 
  border-bottom: 1px solid var(--border-light); 
}

.header-inner { 
  max-width: var(--max-width); 
  margin: 0 auto; 
  padding: 16px 10px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.logo { 
  font-weight: 900; 
  margin-left: -600px;
  font-size: 20px; 
  color: white; 
}
.nav  { 
  margin-right: -400px; 
  text-decoration: none; 
  color: var(--primary-color); 
  font-weight: 600; 
  font-size: 16px;
}

.nav a { 
  margin-left: 20px; 
  text-decoration: none; 
  color: var(--primary-color); 
  font-weight: 600; 
  font-size: 16px;
}

/* Main Layout */
.app { 
  max-width: var(--max-width); 
  margin: 20px auto; 
  padding: 0 16px; 
}

.locator-wrapper { 
  display: flex; 
  gap: 16px; 
  height: calc(100vh - 190px); 
  min-height: 920px; 
}

/* Map Body - Container Fluid */
.map-body {
  width: 100%;
  display: flex;
  gap: 16px;
}

.container-fluidx {
  width: 100%;
  display: flex;
  gap: 16px;
}

/* Sidebar */
.sidebar { 
  width: 490px; 
  min-width: 360px; 
  background: var(--card-bg); 
  border-radius: var(--border-radius); 
  padding: 20px; 
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
   height: 100vh;
  overflow: hidden;
  margin-left: -50px;
}

/* Fixed Top Section */
.sidebar-fixed-top {
  flex: 0 0 auto;
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  z-index: 2;
}

/* Scrollable Listings */
#listings {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 15px 20px 40px;
}

#listings::-webkit-scrollbar {
  width: 6px;
}

#listings::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#listings::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

#listings::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
.gm-ui-hover-effect {
  display: none !important;
}
/* Kill Google default close button */
.gm-ui-hover-effect {
  display: none !important;
}

/* Remove Google white container padding */
.gm-style-iw {
  padding: 0 !important;
}

.gm-style-iw-c {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Prevent inner scroll wrapper */
.gm-style-iw-d {
  overflow: hidden !important;
}

/* Map Wrap */
.map-wrap { 
  flex: 1; 
  border-radius: var(--border-radius); 
  overflow: hidden; 
  box-shadow: 0 6px 18px rgba(0,0,0,0.06); 
}

#map { 
  width: 100%; 
  height: 100%; 
}
/* fallback so map always has visible height if parent sizing is off */
.map-wrap {
  min-height: 320px; 
  margin-right: -50px;     /* desktop fallback */
}

@media (max-width: 768px) {
  .map-wrap { 
    min-height: 45vh;     /* mobile fallback */
  }

  #map {
    min-height: 240px;
    height: 100%;
  }
}

/* Search Row */
.search-row { 
  display: flex; 
  gap: 12px; 
  margin: 16px 0; 
}

.search-row input { 
  flex: 1; 
}

/* Use My Location */
.use-my-area {
  margin-bottom: 20px;
}

.btn-desk, .btn-mob {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  background: white;
  transition: all 0.2s;
}

.btn-desk:hover, .btn-mob:hover {
  background: var(--primary-color);
  color: white;
}

.btn-desk svg path {
  transition: fill 0.2s;
}

.btn-desk:hover svg path,
.btn-mob:hover svg path {
  fill: white;
}

.btn-mob {
  display: none;
}

/* Listings */
.listing {
  border: 2px solid var(--border-gray);
  border-radius: 14px;
  margin-bottom: 14px;
  background: var(--card-bg);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.listing.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px rgba(0,179,190,0.15);
}

.title-row {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 8px;
  padding: 16px 16px 12px;
}

.index-num {
  font-weight: 700;
  color: var(--primary-color);
  flex-shrink: 0;
  font-size: 16px;
}

.title {
  flex: 1;
  font-weight: 600;
  line-height: 1.4;
}

.title-link {
  text-decoration: none;
  color: var(--primary-color);
}

.title-link:hover {
  text-decoration: underline;
}

.chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300B3BE'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s;
}

.listing.active .chevron {
  transform: rotate(180deg);
}

/* Location Details */
.details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s ease;
  padding: 0 16px;
}

.details.open {
  padding: 0 16px 16px;
  max-height: 420px;
}

.distance {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 15px;
}

.distance-value {
  font-style: italic;
  color: var(--primary-color);
  font-weight: 600;
}

.address {
  margin-bottom: 8px;
  line-height: 1.5;
}

.address a {
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}

.address a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.phone {
  margin-bottom: 8px;
}

.phone a {
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}

.phone a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.hours {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-dark);
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.hours-today {
  font-weight: 600;
}

.hours-label {
  font-weight: 600;
  margin-right: 6px;
}

.collapsed-actions {
  padding: 0 16px 16px;
}

.actions { 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
  margin-top: 12px; 
}

.actions .btn {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

/* Footer */
.footer { 
  background: var(--surface-color); 
  border-top: 1px solid var(--border-light); 
  margin-top: 40px; 
  padding: 20px; 
  text-align: center; 
  color: var(--text-muted); 
  font-size: 14px; 
}

/* Map Card */
.map-card {
  position: relative;
  background: var(--primary-color);
  color: #fff;
  padding: 20px 22px 18px;
  border-radius: 14px;
  min-width: 320px;
  max-width: 360px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.map-card::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 12px 12px 0 12px;
  border-style: solid;
  border-color: var(--primary-color) transparent transparent transparent;
}

.map-card-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #e9ffff;
  font-size: 22px;
  cursor: pointer;
}

.map-card-title {
  font-size: 24px;
  font-weight: 700;
  text-decoration: underline;
  margin-bottom: 10px;
}

.map-card-title-link {
  color: white;
  font-weight: 600;
  text-decoration: underline;
}

.map-card-title-link:hover {
  color: white;
  opacity: 0.9;
}

.map-card-address {
  font-size: 18px;
  line-height: 1.4;
}

/* Modal */
.simple-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.simple-modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.simple-modal-header {
  padding: 20px 20px 10px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px 8px 0 0;
}

.simple-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.simple-modal-body {
  padding: 20px;
}

.simple-modal-footer {
  padding: 15px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #eee;
}

.simple-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.simple-btn.primary {
  background: var(--primary-color);
  color: white;
}

.simple-btn.primary:hover {
  background: var(--primary-dark);
}

.simple-btn.secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}
.distance {
  display: flex;
  justify-content: space-between;
}

.distance-value.distance-selected {
  font-style: italic;
  text-align: right;
}
.map-body, .container-fluid, .locator-wrapper {
  display: flex; /* already present, but ensure it */
  gap: 16px;
  min-height: 100 !important;   /* <- important for vertical flex shrinking */
}
.map-wrap {
  flex: 1 1 auto;
  min-width: 0;     /* <- important for horizontal shrinking in flex */
  min-height: 320px; /* safety fallback on small screens */
  height: auto;
}
.sidebar {
  height: auto !important;
  max-height: 100;   /* avoid taking whole viewport on small devices */
  overflow: auto;
}
@media (max-width: 768px) {
  .map-wrap {
    min-height: 45vh;
  }
  .sidebar {
    max-height: 50vh;
  }
}

