/* ===== Collapsible Tree Menu (Drupal-safe) ===== */
.rab-tree-menu {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.5;
}

/* Remove default <details> marker */
.rab-tree-menu summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  padding-left: 1.5rem;
  position: relative;
  margin: 0.2rem 0;
  user-select: none;
}

/* Hide default arrow */
.rab-tree-menu summary::-webkit-details-marker {
  display: none;
}

/* Custom + / − icons */
.rab-tree-menu summary::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  transition: transform 0.2s ease;
}

/* When open, show minus sign */
.rab-tree-menu details[open] > summary::before {
  content: "−";
}

/* Indentation for nested levels */
.rab-tree-menu details {
  margin-left: 1rem;
  padding-left: 0.3rem;
  border-left: 1px solid #eee;
}

/* Leaf links */
.rab-tree-menu a {
  display: block;
  padding-left: 2rem;
  color: #555;
  font-weight: normal;
  /*text-decoration: none;*/
  text-decoration: underline dashed;
  transition: color 0.2s ease;
}

.rab-tree-menu a:hover {
  color: #0078d7;
  text-decoration: underline;
}

/* Leaf span styling (optional) */
.rab-tree-menu .leaf {
  display: inline-block;
  padding-left: 0.2rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .rab-tree-menu {
    padding: 10px;
  }

  .rab-tree-menu summary,
  .rab-tree-menu a {
    font-size: 0.95rem;

  }
}

