html, body { height: 100%; margin: 0; }
body {
  font-family: sans-serif;
  font-size: 14px;
}
#map { height: 100%; }

/* --- Search container (now flex row with settings button) --- */
#search-container {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Wrapper that holds only the pill + autocomplete */
#search-bar {
  position: relative;
  width: 70vw;
  max-width: 400px;
}

#search-pill {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
              0 2px 4px -1px rgba(0,0,0,0.06);
  overflow: hidden;
  width: 100%;
}

/* Avatar & settings buttons */
#avatar-btn,
#admin-btn,
#settings-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
              0 2px 4px -1px rgba(0,0,0,0.06) !important;
}

#avatar-container {
  position: relative;
  display: inline-block;
}
#avatar-menu {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  top: 100%;
  left: 0;
  white-space: nowrap;
}
#avatar-container:hover #avatar-menu {
  display: block;
}
#avatar-menu a {
  text-decoration: none;
  color: black;
}

#search-input {
  flex: 1;
  padding: 8px 8px 8px 12px;
  border: none;
  outline: none;
  box-sizing: border-box;
}

#search-container .material-icons {
  padding: 0 8px;
  color: #4b5563;
}

/* --- Autocomplete list --- */
#autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
              0 2px 4px -1px rgba(0,0,0,0.06);
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #d1d5db;
  max-height: 260px;
  overflow-y: auto;
}

#autocomplete-list li {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #d1d5db;
}

#autocomplete-list li:hover {
  background: #f3f4f6;
}

/* --- Buttons in lower right --- */
#buttons-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.map-button {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.light-btn { background: white; color: #333; }
.dark-btn  { background: #333;  color: white; }

/* --- SVG icon drop shadow --- */
.logo-marker-shadow {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  -webkit-filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* --- Road Trip Planner Panel --- */
#road-trip-planner-panel {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1500;
  transition: top 0.3s ease-in-out;
  padding: 20px;
  box-sizing: border-box;
}

#road-trip-planner-panel.visible { top: 0; }

.location-input { margin-bottom: 15px; }

.location-autocomplete {
  position: absolute;
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.location-autocomplete li {
  padding: 10px;
  cursor: pointer;
}

.location-autocomplete li:hover {
  background: #f3f4f6;
}

.clear-location-btn {
  cursor: pointer;
  color: #666;
  font-size: 24px;
  padding: 0 8px 0 4px;
  display: none;        /* hidden until location is set */
  align-self: center;
}

#plan-trip-btn {
  width: 100%;
  padding: 10px;
  background: #0071CE;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.location-row {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 8px;
}

.location-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}

.location-input input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  outline: none;
  background: transparent;
  text-align: left;
}

/* --- Store Details Panel --- */
#store-details-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
  z-index: 1500;
  transition: bottom 0.3s ease-in-out;
  padding: 20px;
  box-sizing: border-box;
}

#store-details-panel.visible { bottom: 0; }

.store-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

#store-icon { width: 80px; height: 80px; }

.store-details {
  flex: 1;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

#store-name { font-weight: bold; margin: 0; }

#store-address-line1, #store-address-line2, #store-phone, #store-hours { margin: 0; }

#road-trip-planner-from-store {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  padding: 0;
  margin-top: 40px;
}

#close-store-panel {
  position: absolute;
  top: 0;
  right: 0;
}

#search-radius-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

#settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
#settings-modal.visible { display: flex; }

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.modal-header {
  padding: 8px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#close-settings-modal { cursor: pointer; font-size: 28px; color: #666; }

#brands-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0;
}
.brand-row:last-child { border-bottom: none; }
.brand-row img { width: 24px; height: 24px; flex-shrink: 0; }
.brand-row label { flex: 1; font-size: 16px; }
.brand-row input[type="checkbox"] { width: 24px; height: 24px; }

/* Add to hwrt.css – custom cluster appearance (optional but recommended) */
.custom-brand-cluster div {
  background-color: rgba(0, 113, 206, 0.6);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: white;
  font: bold 14px/1 "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  width: 100% !important;
  height: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
#progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;              /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 2000;              /* above map, panels, etc. */
}

#progress-overlay .progress-box {
  background: #ffffff;
  padding: 20px 28px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 500;
}

.progress-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #1976d2;
  animation: progress-spin 0.8s linear infinite;
}

@keyframes progress-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Add to your existing CSS file or <style> block */
#plan-trip-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: #ccc !important;
  color: #666 !important;
}

