body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
}
#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f5f5f5;
}
#main-content {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
}

#side-panel {
  width: 0;
  min-width: 0;
  max-width: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  z-index: 20;
  height: 100%;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

#side-panel.expanded {
  width: 340px;
  min-width: 260px;
  max-width: 400px;
  box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}
#search-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 30;
  position: relative;
}
#address-input, #geocode-btn {
  margin-bottom: 0;
}
#address-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  min-width: 250px;
}
#address-input:focus {
  outline: 2px solid #0079c1;
  border-bottom: none;
}

#suggestions {
  margin-bottom: 8px;
  border-top: none;
  border-bottom: none;
  box-shadow: 0 8px 24px rgba(0,121,193,0.12);
  display: none;
}
#suggestions.active {
  display: block;
}

#geocode-btn {
  margin-top: 8px;
}
#suggestions {
  width: calc(100% - 150px);
  position: absolute;
  top: 55px;
  left: 15px;
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 4px;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}
#suggestions.active {
  display: block;
}

#geocode-btn {
  background: #0079c1;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
}
#geocode-btn:hover {
  background: #005a87;
}

#gps-map-btn {
  position: absolute;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  transition: box-shadow 0.2s, background 0.2s;
}
#gps-map-btn:hover {
  background: #eaf6fb;
  box-shadow: 0 4px 16px rgba(0,121,193,0.12);
}
#gps-map-btn svg {
  display: block;
  width: 28px;
  height: 28px;
  margin: auto;
}

#results-panel {
  background: #fff;
  padding: 0;
  min-height: 0;
  border-top: none;
  border-right: 1px solid #eee;
  font-size: 16px;
  box-shadow: none;
  flex: 0 0 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  opacity: 0;
}

#results-panel.expanded {
  padding: 14px 16px 16px 16px;
  flex: 1 1 auto;
  overflow-y: auto;
  opacity: 1;
}

#results-panel:empty {
  flex: 0 0 0;
  padding: 0;
  opacity: 0;
}

.result-entry, .franchise-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 16px 18px 14px 18px;
  margin-bottom: 18px;
  border: 1px solid #e6e6e6;
  transition: box-shadow 0.2s;
}
.result-entry:last-child, .franchise-card:last-child {
  margin-bottom: 0;
}
.franchise-logo {
  display: block;
  margin: 0 auto 10px auto;
  max-width: 140px;
  max-height: 48px;
  object-fit: contain;
}
.franchise-name {
  font-weight: bold;
  font-size: 1.18em;
  color: #0079c1;
  margin-bottom: 6px;
}
.franchise-phone {
  margin: 2px 0 6px 0;
  font-size: 1.04em;
}
.franchise-phone a {
  color: #0079c1;
  text-decoration: none;
  font-weight: bold;
}
.franchise-phone a:hover {
  text-decoration: underline;
}
.franchise-info {
  color: #444;
  font-size: 15px;
}
#map {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  position: relative;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  #app-container {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  
  #search-panel {
    padding: 10px;
    flex-direction: column;
  }

  #address-input {
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
  }

  #geocode-btn {
    width: 100%;
    padding: 12px 0;
  }

  #suggestions {
    width: calc(100% - 20px);
    left: 10px;
    top: 90px;
  }
  
  #main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }

  #side-panel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    flex: 0 0 auto;
    order: 1;
    box-shadow: none;
    border-bottom: 2px solid #eee;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
  }

  #side-panel.collapsed {
    height: 0;
    max-height: 0;
    border-bottom: none;
  }
  
  #map {
    flex: 1 1 auto;
    min-height: 50vh;
    height: auto;
    order: 2;
    transition: all 0.3s ease-in-out;
  }

  #map.full-height {
    min-height: calc(100vh - 80px); /* Account for search panel */
  }
  
  #results-panel {
    height: auto;
    max-height: calc(50vh - 60px);
    overflow-y: auto;
    flex: 1;
  }

  #results-panel.expanded {
    padding: 15px;
  }
  
  .franchise-logo {
    max-width: 120px;
    max-height: 40px;
  }
  
  #gps-map-btn {
    bottom: 54%;
    right: 20px;
    width: 40px;
    height: 40px;
  }
  
  #geocode-btn {
    padding: 12px 0;
    font-size: 16px;
  }
  
  .suggestion-item {
    padding: 12px;
  }
}

/* Small Mobile Screens */
@media screen and (max-width: 480px) {
  #search-panel {
    padding: 8px;
  }
  
  #address-input {
    font-size: 14px;
    padding: 8px;
  }
  
  #geocode-btn {
    padding: 10px 0;
    font-size: 15px;
  }
  
  .franchise-name {
    font-size: 1.1em;
  }
  
  .franchise-info {
    font-size: 14px;
  }
  
  .franchise-phone {
    font-size: 0.95em;
  }
  
  #gps-map-btn {
    width: 36px;
    height: 36px;
    bottom: 54%;
    right: 16px;
  }
  
  #gps-map-btn svg {
    width: 24px;
    height: 24px;
  }
}
