/* Sidebar Groups */

/* Header row is clickable */
.sidebar-group-header {
  cursor: pointer;
}

/* Active (expanded) state - override djangocms-admin-style with higher specificity */
.djangocms-admin-style .main #nav-sidebar tr.sidebar-group-header.sidebar-group-header--expanded th a.sidebar-group-link,
.djangocms-admin-style .main #content-main tr.sidebar-group-header.sidebar-group-header--expanded th a.sidebar-group-link {
  color: var(--theme-color-4-500);
}

/* Arrow indicator before the link */
.sidebar-group-link::before {
  content: '›';
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.15s;
}

.sidebar-group-header--expanded .sidebar-group-link::before {
  transform: rotate(90deg);
}

/* Indent children */
#nav-sidebar .module tr.sidebar-group-child th,
#content-main table tr.sidebar-group-child th {
  padding-left: 20px;
}

/* Vertically center add button in sidebar */
#nav-sidebar .module tr td {
  vertical-align: middle;
}

/* Proper hyphenation for long words */
.sidebar-group-child th,
.sidebar-group-child th a,
.sidebar-group-header th,
.sidebar-group-link {
  hyphens: auto;
  -webkit-hyphens: auto;
  word-break: break-word;
}

/* Hide collapsed children */
.sidebar-group-child--collapsed {
  display: none;
}

/* Alternating row backgrounds - override nth-child after reordering */
tr.sidebar-row-odd {
  background: var(--body-bg);
}

tr.sidebar-row-even {
  background: var(--darkened-bg);
}
