/* Base */
.edix-dealer-locator {
  width: 100%;
}

.edix-dealer-locator #edix-reset {
  margin-top:25px;
}

.leaflet-container {
  border: 1px solid #eee;
  border-radius: 12px;
}

.leaflet-marker-icon {
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.35));
}

.leaflet-marker-icon:hover {
  transform: scale(1.15) translateY(-3px);
  filter:
    drop-shadow(0 6px 8px rgba(0,0,0,0.35))
    drop-shadow(0 0 6px rgba(172,0,51,0.45)); /* EDIX rood */
}


/* Layout */
.edix-layout {
  display: grid;
  grid-template-columns: 280px 1.4fr 1fr;
  gap: 12px;
  align-items: start;
}

h3.dealer-locator {
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Filters */
.edix-filters {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  position: sticky;
  top: 12px;
  height: fit-content;
}

.edix-filters input:not([type='checkbox']) {
  width: 100%;
  border-radius: 12px;
}

.edix-filter-block {
  margin-bottom: 14px;
}

.edix-filter-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.edix-filters input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Tree */
.edix-tree {
  max-height: 420px;
  overflow: auto;
  padding: 8px;
}

.edix-tree-search {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 8px 0 10px;
}


/* Tree layout */
.edix-tree-node {
  padding: 2px 0;
}

.edix-tree-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.edix-tree-toggle {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.edix-tree-toggle.is-empty {
  cursor: default;
}


/* jouw existing arrow kan blijven, dit maakt het wat strakker */
.edix-tree-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent #AC0033;
  transform-origin: 50% 50%;
  transition: transform 0.12s ease;
}

.edix-tree-toggle.is-empty::before {
  border-color: transparent;
}

.edix-tree-node.is-collapsed .edix-tree-toggle::before {
  transform: rotate(0deg);
}

.edix-tree-node:not(.is-collapsed) .edix-tree-toggle::before {
  transform: rotate(90deg);
}

.edix-tree-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
}

.edix-tree-label input {
  margin: 0;
  transform: translateY(1px);
}

.edix-tree-text {
  cursor: pointer;
}

/* List */
.edix-list {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px;
  overflow: auto;
  max-height: 650px;
}

.edix-card {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}

.edix-card:hover {
  background: #fafafa;
}

.edix-card .title {
  font-weight: 700;
  margin-bottom: 6px;
}

.edix-card .meta {
  color: #666;
  font-size: 13px;
}

.edix-card .meta a {
  color: inherit;
  text-decoration: none;
}

.edix-card .meta a:hover {
  text-decoration: underline;
}


.edix-cat-badges {
  position: absolute;
  top: 15px;
  right: 22px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

/* Category rows: parent links, children rechts ernaast */
.edix-cat-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.edix-cat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.edix-cat-parent {
  flex: 0 0 auto;
}

.edix-cat-children {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.edix-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* Child pills iets kleiner */
.edix-pill.is-child {
  font-size: 10px;
  padding: 2px 7px;
  opacity: 0.95;
}

.edix-pill.is-parent {
  font-size: 11px;
  padding: 2px 8px;
}

.edix-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}


/* parent categorie */
.edix-pill.is-parent {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* subcategorie */
.edix-pill.is-child {
  font-size: 11px;
  opacity: 0.85;
  padding-left: 8px;
}

/* Hover effect */
.edix-card:hover .edix-pill {
  transform: translateY(-1px);
  transition: transform 120ms ease;
}

/* Fallback (als er geen kleur gevonden wordt) */
.edix-pill.is-default {
  background: #f6f6f6;
  color: #333;
}

.edix-pill.is-default .edix-pill-dot {
  background: #AC0033; /* EDIX rood */
}


/* Responsive */
@media (max-width: 980px) {
  .edix-layout {
    grid-template-columns: 1fr;
  }

  .edix-filters {
    position: static;
    top: auto;
  }

  .edix-tree {
    max-height: 260px;
  }

  .edix-list {
    max-height: 420px;
  }
}
