/* Custom Leaflet map styles */

.custom-map {
  width: 100%;
  height: 400px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #e8eef2;
}

.project-map .custom-map {
  border-radius: 0;
}

/* Override Leaflet's default marker icon container — the inner pin draws everything */
.rwb-marker {
  background: transparent !important;
  border: none !important;
}

.rwb-marker-pin {
  position: relative;
  width: 56px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.rwb-marker-circle {
  width: 56px;
  height: 56px;
  background: #fff;
  border: 3px solid var(--color-accent, #CC0605);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.rwb-marker-circle img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}

.rwb-marker-tail {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 16px solid var(--color-accent, #CC0605);
  margin-top: -3px;
}

/* Popup tweak — match brand colors */
.leaflet-popup-content-wrapper {
  border-radius: 6px;
}
.leaflet-popup-content {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  margin: 10px 14px;
}
.leaflet-popup-content strong {
  color: var(--color-primary, #26262b);
}

/* Custom branded layer switcher — two buttons matching site button styles (Detail / Anfrage) */
.rwb-layer-switcher {
  display: flex;
  gap: 8px;
  font-family: 'Inter', sans-serif;
}

.rwb-layer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Active (current layer) — Anfrage-Senden look: red filled */
.rwb-layer-btn.active {
  background: var(--color-accent, #CC0605);
  color: #fff;
  border-color: var(--color-accent, #CC0605);
  cursor: default;
}

/* Inactive (clickable to switch) — Detail-Button look: white with dark border */
.rwb-layer-btn:not(.active) {
  background: #fff;
  color: var(--color-primary, #26262b);
  border-color: var(--color-primary, #26262b);
}

.rwb-layer-btn:not(.active):hover {
  background: var(--color-primary, #26262b);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.rwb-layer-btn:focus-visible {
  outline: 3px solid rgba(204, 6, 5, 0.4);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .rwb-layer-btn {
    padding: 7px 12px;
    font-size: 12px;
  }
  .rwb-layer-switcher {
    gap: 6px;
  }
}
