.wr-profile-servicecats ul.wr-servicecat-children > li.wr-servicecat-item { display: list-item; }
.wr-profile-servicecats li.wr-servicecat-item > .wr-subcats-viewport > ul.wr-servicecat-children > li.wr-servicecat-item:nth-child(n+5){ display: none; }
.wr-profile-servicecats li.wr-servicecat-item.expanded > .wr-subcats-viewport > ul.wr-servicecat-children > li.wr-servicecat-item { display: list-item; }

/* Arrow button */
.wr-profile-servicecats li.wr-servicecat-item > label.skill-tag-text{
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 100px; /* space for action pill on the right */
}
.wr-profile-servicecats li.wr-servicecat-item{ position: relative; }
.wr-profile-servicecats .wr-cat-arrow{
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 6px;
  padding: 4px 10px;
  min-width: 50px;
  height: auto;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  color: #676767;
  z-index: 2;
  border-radius: 18px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.wr-profile-servicecats .wr-cat-arrow:hover{
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #353648;
}
.wr-profile-servicecats .wr-cat-arrow .wr-icon-chevron-down::before{ content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.wr-profile-servicecats li.wr-servicecat-item.expanded > .wr-cat-arrow .wr-icon-chevron-down::before{ content: "\f077"; }
.wr-profile-servicecats .wr-cat-arrow .wr-cat-arrow-text{
  font-size: inherit; /* match surrounding text */
  line-height: 1;
  text-transform: none;
  writing-mode: initial;
  transform: none;
  white-space: nowrap;
}

/* Selected state highlight (reuse existing if any) */
.wr-profile-servicecats li.wr-servicecat-item.selected > label.skill-tag-text{ color:#111827; font-weight:600; }

/* Responsive columns for service categories list */
.wr-servicecats-list{ display:grid; grid-template-columns:1fr; gap:12px; width:100%; box-sizing:border-box; }
@media (min-width: 768px){
  .wr-servicecats-list{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px){
  .wr-servicecats-list{ grid-template-columns: repeat(3, 1fr); }
}

/* Ensure items don't overflow columns */
.wr-servicecats-container .wr-servicecat-item{ min-width:0; }
.wr-servicecats-container ul.wr-servicecats-list > li.wr-servicecat-item > label.skill-tag-text{ padding-right:36px; }
.wr-servicecats-container .wr-cat-arrow{ right:8px; width:24px; height:24px; }

/* Expanded + selected: light gray background with dark text */
.wr-servicecats-container .wr-servicecat-item.expanded.selected > label.skill-tag-text,
.wr-servicecats-container .wr-servicecat-item.expanded.selected .skill-tag-text{
  background-color:#F7F7F7;
  color:#111827;
  border-color:#e1e1e1;
}

/* Responsive columns for nested service categories inside container */
.wr-servicecats-container .wr-servicecat-children{ display:grid; grid-template-columns:1fr; gap:6px; }
@media (min-width: 768px){
  .wr-servicecats-container .wr-servicecat-children{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px){
  .wr-servicecats-container .wr-servicecat-children{ grid-template-columns: repeat(3, 1fr); }
}
