body { background: #fafafa; }
.navbar-brand { letter-spacing: .2px; }

.filter-card { border-radius: 14px; }
.room-card { cursor: pointer; border-radius: 14px; overflow: hidden; }
.room-card img { width: 100%; height: 100%; object-fit: cover; }
.object-fit-cover { object-fit: cover; }
.thumb-strip img { width: 86px; height: 64px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 1px solid #e5e5e5; }
.thumb-strip img:hover { border-color: #bdbdbd; }

.tags-filter-shell {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 18px;
  padding: 1rem;
}

.selected-tags-summary,
.selected-tags-panel {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 18px;
  padding: 1rem;
}

.selected-tags-summary.is-empty {
  background: #fcfcfd;
}

.selected-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  min-height: 2.5rem;
}

.selected-tags-list.is-empty {
  align-items: center;
}

.selected-tags-placeholder {
  color: #6c757d;
  font-size: .95rem;
}

.selected-tag-chip {
  appearance: none;
  border: 1px solid #cfe2ff;
  background: #eef4ff;
  color: #0a3d91;
  border-radius: 999px;
  padding: .45rem .8rem;
  font-size: .92rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  cursor: pointer;
  transition: all .18s ease;
}

.selected-tag-chip:hover {
  border-color: #9ec5fe;
  transform: translateY(-1px);
}

.selected-tag-chip-remove {
  font-size: 1rem;
  line-height: 1;
}

.tags-filter-actions {
  flex-shrink: 0;
}

.tag-group-card { background:#fff; border:1px solid #e9ecef; border-radius:18px; padding:1rem; }
.tag-group-title { font-weight:600; font-size:.95rem; }
.tag-filter-chip, .tag-option-chip {
  appearance:none; border:1px solid #d9dee3; background:#fff; color:#1f2937; border-radius:999px;
  padding:.45rem .8rem; font-size:.9rem; line-height:1.2; transition:all .18s ease; cursor:pointer;
}
.tag-filter-chip:hover, .tag-option-chip:hover { border-color:#9ec5fe; transform:translateY(-1px); }
.tag-filter-chip.is-active, .tag-option-chip.is-selected {
  background:#0d6efd; color:#fff; border-color:#0d6efd; box-shadow:0 8px 18px rgba(13,110,253,.16);
}

#filtersForm .room-image-switch-wrap {
  padding-left: 0;
}

#filtersForm .room-image-switch {
  width: 2.7rem;
  height: 1.38rem;
  border-radius: 999px !important;
  border: 2px solid var(--rf-orange, #ff9c01) !important;
  background-color: #fff !important;
  background-image: radial-gradient(circle, var(--rf-orange, #ff9c01) 0 46%, transparent 48%) !important;
  background-position: .16rem center !important;
  background-repeat: no-repeat !important;
  background-size: .82rem .82rem !important;
  cursor: pointer;
  transition: background-color .18s ease, background-position .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#filtersForm .room-image-switch:checked {
  border-color: var(--rf-orange, #ff9c01) !important;
  background-color: var(--rf-orange, #ff9c01) !important;
  background-image: radial-gradient(circle, #fff 0 46%, transparent 48%) !important;
  background-position: right .16rem center !important;
}

@media (max-width: 991.98px) {
  .tags-filter-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Karten-Popups werden auch ausserhalb der Startseite genutzt. */
#roomsOverviewMap .leaflet-marker-icon.rf-map-dot-icon,
#roomMap .leaflet-marker-icon.rf-map-dot-icon,
#roomDetailMap .leaflet-marker-icon.rf-map-dot-icon {
  background: transparent !important;
  border: 0 !important;
  filter: none !important;
  position: relative;
  overflow: visible;
}

.rf-map-dot-multi {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcb1f 0%, #ff9c01 58%, #ff5a1f 100%);
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.32);
}

.rf-map-dot-multi-count {
  color: #111;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
}

.rf-map-dot {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcb1f 0%, #ff9c01 58%, #ff5a1f 100%);
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.28), 0 0 0 2px rgba(255,156,1,.35);
  position: relative;
}

.rf-map-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
}

.rf-modern-room-popup .leaflet-popup-content-wrapper {
  padding: 0 !important;
  background: #18304b !important;
  color: #fff6e9 !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.30) !important;
  overflow: hidden;
}

.rf-modern-room-popup .leaflet-popup-content {
  margin: 0 !important;
  width: 260px !important;
}

.rf-modern-room-popup .leaflet-popup-tip {
  background: #18304b !important;
  border: 0 !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}

.rf-map-popup {
  position: relative;
  background: #18304b;
}

.rf-map-popup-image {
  height: 86px;
  background-size: cover;
  background-position: center;
  opacity: .88;
}

.rf-map-popup-body {
  position: relative;
  padding: 13px 15px 15px;
}

.rf-map-popup-close {
  position: absolute;
  right: 9px;
  top: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #fff6e9;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: .9;
}

.rf-map-popup-title {
  padding-right: 28px;
  color: #fff6e9 !important;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.12;
}

.rf-map-popup-address {
  margin-top: 5px;
  color: rgba(255,246,233,.78) !important;
  font-size: 13px;
  line-height: 1.25;
}

.rf-map-popup-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: #fff6e9 !important;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.rf-map-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.rf-map-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 34px;
  text-align: center;
  text-decoration: none;
  color: #111 !important;
  background: linear-gradient(90deg, #ffcb1f, #ffb11c, #ff9c01);
  border: 1px solid rgba(0,0,0,.28);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
}

.rf-map-popup-button:hover,
.rf-map-popup-button:focus {
  color: #111 !important;
  background: linear-gradient(90deg, #ffd64a, #ffb11c, #ff8f00);
}

.rf-map-multi-header {
  position: relative;
  padding: 13px 15px 10px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.rf-map-popup-multi .rf-map-popup-close {
  position: absolute;
  right: 9px;
  top: 8px;
}

.rf-map-multi-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding: 10px 15px 12px;
  overscroll-behavior: contain;
}

.rf-map-multi-scroll::-webkit-scrollbar {
  width: 4px;
}

.rf-map-multi-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,.08);
}

.rf-map-multi-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.28);
  border-radius: 2px;
}

.rf-map-multi-room {
  margin-top: 10px;
}

.rf-map-multi-room:first-child {
  margin-top: 0;
}

.rf-map-multi-divider {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 12px;
}

/* Karten-Popup: Vermieter mit Raumliste an einer Adresse */
.rf-map-landlord-section {
  padding: 13px 15px 15px;
}

.rf-map-room-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #fff6e9 !important;
  font-size: 13px;
  line-height: 1.35;
}

.rf-map-room-list li + li {
  margin-top: 4px;
}

/* Karten-Popup: Vermieterzeile */
.rf-map-popup-landlord {
  margin-top: 7px;
  color: #fff6e9 !important;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}
