/* Resopal Dealer Locator - style.css v1.1 */

.rdl-wrap *,
.rdl-wrap *::before,
.rdl-wrap *::after {
  box-sizing: border-box;
  font-family: 'Fira Sans', 'Segoe UI', system-ui, sans-serif;
}

/* Full width - vult de volledige Elementor container */
.rdl-wrap {
  --rdl-red:     #CC0000;
  --rdl-red-d:   #A30000;
  --rdl-dark:    #1e1e1e;
  --rdl-muted:   #888;
  --rdl-line:    #e8e8e8;
  --rdl-white:   #ffffff;

  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rdl-line);
  box-shadow: 0 4px 30px rgba(0,0,0,0.10);
  background: var(--rdl-white);
}

/* ── Header ── */
.rdl-header {
  background: var(--rdl-dark);
  padding: 22px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 3px solid var(--rdl-red);
}

.rdl-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin: 0 0 2px !important;
  letter-spacing: -0.1px;
  line-height: 1.3 !important;
}

.rdl-subtitle {
  font-size: 12px !important;
  color: #aaa !important;
  margin: 0 !important;
}

/* ── Filter buttons ── */
.rdl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rdl-btn {
  padding: 5px 13px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.20);
  background: transparent;
  color: #bbb;
  font-size: 12px;
  font-family: 'Fira Sans', sans-serif;
  cursor: pointer;
  transition: all 0.13s ease;
  line-height: 1.4;
}

.rdl-btn:hover {
  background: rgba(255,255,255,0.09);
  color: #fff;
  border-color: rgba(255,255,255,0.40);
}

.rdl-btn.active {
  background: var(--rdl-red);
  border-color: var(--rdl-red);
  color: #fff;
  font-weight: 600;
}

/* ── Body: sidebar + kaart naast elkaar ── */
.rdl-body {
  display: flex;
  /* hoogte wordt via inline CSS variabele ingesteld vanuit PHP/Elementor */
  height: var(--rdl-height, 560px);
}

/* ── Sidebar ── */
.rdl-sidebar {
  width: var(--rdl-sidebar, 320px);
  min-width: 220px;
  max-width: 50%;
  overflow-y: auto;
  border-right: 1px solid var(--rdl-line);
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.rdl-sidebar::-webkit-scrollbar { width: 3px; }
.rdl-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.rdl-search-wrap {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rdl-line);
  background: var(--rdl-white);
  position: sticky;
  top: 0;
  z-index: 5;
}

.rdl-search {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  font-family: 'Fira Sans', sans-serif;
  background: #fafafa;
  outline: none;
  color: var(--rdl-dark);
  transition: border-color 0.12s;
}

.rdl-search:focus {
  border-color: var(--rdl-red);
  background: var(--rdl-white);
}

.rdl-list {
  flex: 1;
  overflow-y: auto;
}

/* ── Country labels ── */
.rdl-country {
  padding: 10px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--rdl-muted);
  background: #f5f5f5;
}

/* ── Dealer cards ── */
.rdl-card {
  padding: 12px 14px;
  border-bottom: 1px solid #ebebeb;
  cursor: pointer;
  transition: background 0.10s;
}

.rdl-card:hover { background: #ededed; }

.rdl-card.active {
  background: #fff0f0;
  border-left: 3px solid var(--rdl-red);
  padding-left: 11px;
}

.rdl-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--rdl-dark);
  margin-bottom: 2px;
}

.rdl-card-city {
  font-size: 11px;
  font-weight: 400;
  color: var(--rdl-muted);
}

.rdl-card-addr {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
  margin-bottom: 5px;
}

.rdl-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.rdl-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
}

.rdl-tag.int { background: #eaf3de; color: #3b6d11; }
.rdl-tag.ext { background: #e6f1fb; color: #185fa5; }

/* ── Kaart ── */
.rdl-map-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

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

/* ── Footer ── */
.rdl-footer {
  padding: 8px 16px;
  background: var(--rdl-white);
  border-top: 1px solid var(--rdl-line);
  font-size: 12px;
  color: var(--rdl-muted);
  text-align: center;
}

/* ── Leaflet popup ── */
.rdl-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: none;
  font-family: 'Fira Sans', sans-serif;
}

.rdl-popup .leaflet-popup-content {
  margin: 14px 16px;
  min-width: 210px;
}

.rdl-popup-tags { display: flex; gap: 4px; margin-bottom: 7px; flex-wrap: wrap; }
.rdl-popup-tag  { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 3px; }
.rdl-popup-tag.int { background: #eaf3de; color: #3b6d11; }
.rdl-popup-tag.ext { background: #e6f1fb; color: #185fa5; }

.rdl-popup-name  { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; }
.rdl-popup-addr  { font-size: 12px; color: #777; line-height: 1.5; margin-bottom: 7px; }
.rdl-popup-phone { font-size: 12px; color: #555; margin-bottom: 6px; }
.rdl-popup-phone a { color: #555; text-decoration: none; }
.rdl-popup-phone a:hover { text-decoration: underline; }

.rdl-popup-links { display: flex; gap: 10px; flex-wrap: wrap; }

.rdl-popup-link {
  font-size: 11px;
  font-weight: 600;
  color: #CC0000;
  text-decoration: none;
}
.rdl-popup-link:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .rdl-body {
    flex-direction: column;
    height: auto;
  }
  .rdl-sidebar {
    width: 100% !important;
    max-width: 100%;
    max-height: 260px;
    border-right: none;
    border-bottom: 1px solid var(--rdl-line);
  }
  .rdl-map-wrap { height: 340px; }
  .rdl-header   { padding: 16px; }
}
