/* ============================================================
   RMF Listings Map — scoped to .rmf-map-wrap
   ============================================================ */

.rmf-map-wrap *,
.rmf-map-wrap *::before,
.rmf-map-wrap *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

.rmf-map-wrap {
  font-family: 'Open Sans', sans-serif;
  font-size: 11pt;
  background: #f0f0f0;
  width: 100%;
  height: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* ── Top bar ── */
.rmf-top-bar {
  background: #ba0c2f;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  z-index: 1000;
}

.rmf-top-bar-title {
  font-family: 'Poppins', sans-serif;
  font-size: 13pt;
  color: #fff;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  padding: 0;
}

.rmf-count-label {
  margin-left: auto;
  font-family: 'Open Sans', sans-serif;
  font-size: 9pt;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

/* ── Main layout ── */
.rmf-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── Sidebar ── */
.rmf-sidebar {
  width: 25%;
  min-width: 250px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.rmf-sidebar-inner {
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rmf-filter-label {
  display: block;
  font-size: 8.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #63666a;
  margin-bottom: 8px;
  padding: 0;
}

.rmf-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.rmf-filter-header .rmf-filter-label {
  margin-bottom: 0;
}

.rmf-btn-clear {
  font-size: 8pt;
  color: #ba0c2f;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  padding: 0;
  text-decoration: underline;
  line-height: 1;
}

.rmf-btn-clear:hover {
  color: #950a26;
}

.rmf-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rmf-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10pt;
  color: #000;
  cursor: pointer;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

.rmf-checkbox-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #ba0c2f;
  margin: 0;
}

.rmf-checkbox-scroll {
  max-height: 175px;
  overflow-y: auto;
  padding: 4px 2px;
  border: 1px solid #e8e8e8;
}

.rmf-checkbox-scroll label {
  padding: 2px 6px;
}

.rmf-cb-all-label {
  font-weight: 700 !important;
  color: #63666a !important;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 6px !important;
  margin-bottom: 2px;
}

.rmf-radio-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rmf-radio-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10pt;
  color: #000;
  cursor: pointer;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

.rmf-radio-group input[type="radio"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #ba0c2f;
  margin: 0;
}

.rmf-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0;
}

/* ── Map panel ── */
.rmf-map-panel {
  flex: 1;
  position: relative;
  min-width: 0;
}

#rmfMap {
  width: 100%;
  height: 100%;
}

/* ── Popup ── */
.rmf-map-wrap .leaflet-popup-content-wrapper {
  padding: 0 !important;
  overflow: hidden;
}

.rmf-map-wrap .leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}

.rmf-listing-popup {
  width: 230px;
  display: flex;
  flex-direction: column;
  border: 3px solid #63666a;
}

.rmf-popup-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.rmf-popup-thumb-placeholder {
  width: 100%;
  height: 130px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 9pt;
}

.rmf-popup-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rmf-popup-title {
  font-family: 'Poppins', sans-serif;
  font-size: 10pt;
  font-weight: 400;
  color: #000;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0;
  padding: 0;
}

.rmf-popup-meta {
  font-size: 8pt;
  color: #63666a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.rmf-popup-sf {
  font-size: 9.5pt;
  color: #333;
  margin: 2px 0 0;
}

.rmf-popup-pdf {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 12px;
  background: #ba0c2f;
  color: #fff !important;
  font-size: 9pt;
  font-weight: 700;
  text-decoration: none !important;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

.rmf-popup-pdf:hover {
  background: #950a26;
  color: #fff !important;
}

/* ── Leaflet overrides ── */
.rmf-map-wrap .leaflet-popup-tip-container {
  display: none;
}

.rmf-map-wrap .leaflet-popup-close-button {
  color: #fff !important;
  background: rgba(0, 0, 0, 0.3) !important;
  width: 20px !important;
  height: 20px !important;
  font-size: 14px !important;
  line-height: 20px !important;
  text-align: center !important;
}

/* ── No results ── */
.rmf-no-results {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px 28px;
  font-family: 'Poppins', sans-serif;
  font-size: 11pt;
  color: #63666a;
  z-index: 500;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .rmf-map-wrap {
    height: auto;
    overflow: visible;
  }

  .rmf-main {
    flex-direction: column;
    overflow: visible;
    height: auto;
  }

  .rmf-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    overflow-y: visible;
  }

  .rmf-map-panel {
    height: 60vw;
    min-height: 340px;
  }

  #rmfMap {
    height: 100%;
  }
}
