/* Base layout */
.budmap-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.budmap-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-end;
  margin-bottom: 8px;
}

/* Kill vertical spacing from theme wrappers */
.budmap-controls > * {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Hard reset inside the controls so theme CSS cannot add big gaps */
.budmap-controls * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.budmap-controls input,
.budmap-controls select {
  margin: 0 !important;
}


.budmap-controls .input-wrap,
.budmap-controls .budmap-select-wrap,
.budmap-controls .budmap-radius,
.budmap-controls .budmap-actions-top {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.budmap-controls .input-wrap {
  flex: 1 1 220px;
}

.budmap-controls input[type="search"],
.budmap-controls select,
.budmap-controls input[type="range"] {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #dde1e7;
  padding: 4px 14px;
  font-size: 14px;
  box-sizing: border-box;
}

.budmap-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
  color: #06262d;
}

.budmap-select-wrap {
  flex: 0 0 180px;
}

.budmap-radius {
  flex: 0 0 200px;
  font-size: 12px;
  color: #4a5568;
}

.budmap-radius span {
  display: block;
  margin-bottom: 4px;
}

.budmap-actions-top {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}

.budmap-btn {
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  background: #06262d;
  color: #ffffff;
  transition: background 0.18s ease, transform 0.1s ease;
}

.budmap-btn.outline {
  background: #ffffff;
  color: #06262d;
  border: 1px solid #06262d;
}

.budmap-btn:hover {
  background: #09404a;
  transform: translateY(-1px);
}

.budmap-btn.outline:hover {
  background: #06262d;
  color: #ffffff;
}

/* Notice */
.budmap-notice {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
}

/* Map */
.budmap-map {
  width: 100%;
  height: 460px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.budmap-loading {
  text-align: center;
  padding: 40px 0;
  color: #888;
  font-size: 14px;
}

/* List */
.budmap-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.budmap-card {
  border-radius: 12px;
  border: 1px solid #edf2f7;
  padding: 10px 12px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budmap-card .hdr {
  display: flex;
  gap: 10px;
  align-items: center;
}

.budmap-card .hdr .logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

.budmap-card .name {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.budmap-card .meta {
  font-size: 12px;
  color: #6b7280;
}

.budmap-card .rating {
  font-size: 12px;
  color: #b45309;
  margin-top: 2px;
}

.budmap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.budmap-link {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  color: #06262d;
  background: #ffffff;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.budmap-link:hover {
  background: #06262d;
  color: #ffffff;
  border-color: #06262d;
}

/* Popup */
.leaflet-popup-content .budmap-popup {
  font-size: 13px;
}

.budmap-popup .budmap-rating {
  font-weight: 600;
  color: #b45309;
}

.budmap-popup-links a {
  font-size: 12px;
}

/* Vendor single */
.budmap-vendor {
  max-width: 900px;
  margin: 0 auto;
}

.budmap-vendor-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.budmap-vendor-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Mobile overrides */
@media (max-width: 768px) {
  .budmap-wrap {
    padding: 10px;
  }
  .budmap-controls {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .budmap-controls > * {
    margin: 0 !important;
  }
  .budmap-select-wrap,
  .budmap-controls .input-wrap,
  .budmap-radius,
  .budmap-actions-top {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .budmap-map {
    height: 560px !important;
    min-height: 65vh;
  }
  .budmap-list {
    grid-template-columns: 1fr;
  }
}
