/* Home map controls refinement */
.map-brand-bar {
  align-items: flex-start;
}

.map-brand {
  width: 54px;
  min-width: 54px;
  height: 54px;
  justify-content: center;
  gap: 0;
  padding: 0 !important;
  border-color: rgba(8, 127, 79, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 30px rgba(12, 67, 43, .18);
  -webkit-tap-highlight-color: transparent;
}

.map-brand > img,
.map-brand > span {
  display: none !important;
}

.map-brand .map-brand-toggle-icon {
  width: 42px;
  height: 42px;
  margin: 0 !important;
  border: 1px solid rgba(20, 142, 87, .13);
  border-radius: 14px;
  background: linear-gradient(145deg, #eefaf4, #e2f5eb);
  color: #087c4d;
  font-size: 18px;
  box-shadow: inset 0 1px 0 #fff;
}

.map-brand[aria-expanded="true"] .map-brand-toggle-icon {
  background: linear-gradient(145deg, #128c59, #076c43) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .42);
  box-shadow: 0 7px 17px rgba(8, 112, 67, .27), inset 0 1px 0 rgba(255, 255, 255, .28);
  animation: none !important;
}

.map-brand:hover {
  transform: translateY(-2px) scale(1.02);
}

.map-discovery-panel {
  top: max(98px, calc(env(safe-area-inset-top) + 98px));
}

.map-actions {
  gap: 10px;
}

.map-actions button {
  position: relative;
  isolation: isolate;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(8, 124, 77, .16);
  border-radius: 17px;
  background: rgba(255, 255, 255, .97);
  color: #087c4d;
  box-shadow: 0 10px 28px rgba(13, 64, 44, .18), inset 0 1px 0 #fff;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.map-actions button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 7px;
  border-radius: 12px;
  background: linear-gradient(145deg, #edf9f3, #e1f3e9);
  transition: transform .22s ease, background .22s ease;
}

.map-actions button i {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  margin: 0;
  font-size: 20px;
  line-height: 1;
}

.map-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(13, 64, 44, .23);
}

.map-actions button:active {
  transform: scale(.94);
}

.map-actions button:active::before {
  transform: scale(.9);
}

.map-actions [data-current-location]::before {
  background: linear-gradient(145deg, #0d9b61, #08744a);
}

.map-actions [data-current-location] i {
  color: #fff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .16));
}

@media (max-width: 767px) {
  .map-brand-bar {
    top: max(10px, env(safe-area-inset-top));
  }

  .map-brand {
    width: 46px;
    min-width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .map-brand .map-brand-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 16px;
  }

  .map-discovery-panel {
    top: max(72px, calc(env(safe-area-inset-top) + 72px));
    width: calc(100% - 20px);
  }

  .map-actions button {
    width: 47px !important;
    height: 47px !important;
    border-radius: 16px;
  }

  .map-actions button::before {
    inset: 6px;
    border-radius: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-brand,
  .map-actions button,
  .map-actions button::before {
    transition: none !important;
  }
}
