#search-container {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 10px;
  border-radius: 5px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1001;
  width: 100%;
  max-height: min(340px, 55vh);
  overflow-y: auto;
  padding: 5px;
  background: rgba(255, 253, 251, 0.98);
  border: 1px solid rgba(107, 66, 38, 0.14);
  box-shadow: 0 16px 36px rgba(45, 30, 22, 0.16);
  border-radius: 14px;
  display: none;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #c7b5a8 transparent;
}

.search-container {
  position: relative;
  z-index: 1001; /* Pastikan lebih tinggi dari kontrol peta */
}

.search-result {
  position: relative;
  display: block;
  padding: 12px 38px 12px 12px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.search-result + .search-result {
  margin-top: 2px;
}

.search-result:hover {
  background-color: #f7efe9;
}

.search-result:focus-visible {
  outline: 2px solid #8b5a2b;
  outline-offset: -2px;
  background-color: #f7efe9;
}

.search-result-name {
  color: #211b18;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
}

.search-result-address {
  margin-top: 3px;
  color: #5b6472;
  font-size: 0.82rem;
  line-height: 1.45;
}

.search-result-owner {
  margin-top: 3px;
  color: #8b7568;
  font-size: 0.75rem;
  line-height: 1.35;
}

.search-result-arrow {
  position: absolute;
  top: 50%;
  right: 13px;
  color: #8b5a2b;
  font-size: 1rem;
  opacity: 0;
  transform: translate(-3px, -50%);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.search-result:hover .search-result-arrow,
.search-result:focus-visible .search-result-arrow {
  opacity: 1;
  transform: translate(0, -50%);
}

.search-result-empty {
  padding: 18px 14px;
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
}

#search-input {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 25px;
  outline: none;
  transition: all 0.3s;
}

#search-input:focus {
  border-color: #6b4226;
  box-shadow: 0 0 0 3px rgba(107, 66, 38, 0.2);
}

@media (max-width: 640px) {
  #search-results {
    max-height: min(300px, 48vh);
    padding: 4px;
    border-radius: 12px;
  }

  .search-result {
    padding: 11px 32px 11px 10px;
  }

  .search-result-name {
    font-size: 0.9rem;
  }

  .search-result-address {
    font-size: 0.78rem;
  }
}

@media (hover: none) {
  .search-result-arrow {
    opacity: 0.7;
    transform: translate(0, -50%);
  }
}

.map-controls {
  background: none;
  box-shadow: none;
  border: none;
}

.simple-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.simple-toggle input {
  display: none;
}

.slider {
  width: 36px;
  height: 18px;
  background-color: #ccc;
  border-radius: 999px;
  position: relative;
  transition: background-color 0.3s ease;
}

.slider::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider::before {
  transform: translateX(18px);
}

.simple-toggle i {
  color: #6b4226;
  font-size: 16px;
}

.toggle-text {
  font-weight: bold;
  color: #333;
}

.exit-routing-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.exit-routing-btn:hover {
  background-color: #dc2626;
}

.estimate-popup {
  width: 250px;
  padding: 10px;
}

.form-select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.btn-calculate {
  width: 100%;
  padding: 8px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.estimate-result {
  margin-top: 10px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 4px;
}

.estimate-detail p {
  margin: 5px 0;
  font-size: 14px;
}

.error {
  color: red;
  font-size: 14px;
}
