/* Hierarchical Category Styles */
.hierarchical-categories-wrapper {
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 0;
  /* border-bottom: 1px solid #f0f0f0; */
  padding-bottom: 0;
}

.category-item:last-child {
  border-bottom: none;
}

.category-parent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 10px;
}

.category-label {
  display: flex;
  align-items: center;
  flex: 1;
  margin: 0;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.category-label:hover .category-name {
  color: #000;
}

.category-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  position: relative;
  background: white;
  margin: 0;
  flex-shrink: 0;
}

.category-checkbox:checked {
  background-color: #4caf50;
  border-color: #4caf50;
}

.category-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.category-checkbox:hover {
  border-color: #999;
}

.category-name {
  flex: 1;
  font-size: 14px;
  color: #333;
  text-transform: capitalize;
  font-weight: normal;
}

.category-count {
  color: #999;
  font-size: 13px;
  margin-left: 4px;
  flex-shrink: 0;
}

.category-toggle {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: none;
  margin-left: 8px;
  font-size: 12px;
}

.category-toggle:hover {
  color: #333;
}

.category-toggle .toggle-arrow {
  display: block;
  line-height: 1;
  transition: none;
}

.category-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.category-children-wrapper {
  padding-left: 15px;
  margin: 0;
  display: none;
  padding-bottom: 8px;
}

.category-children-wrapper[style*="display: block"] {
  display: block !important;
}

.category-child {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-child .category-name {
  font-size: 14px;
  color: #333;
  font-weight: normal;
  text-transform: capitalize;
}

.category-child .category-count {
  font-size: 13px;
  color: #999;
}

.category-child:hover .category-name {
  color: #000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .category-parent-row {
    padding: 8px 0;
  }
  
  .category-name {
    font-size: 13px;
  }
  
  .category-count {
    font-size: 12px;
  }
  
  .category-children-wrapper {
    padding-left: 15px;
  }
  
  .category-child .category-name {
    font-size: 13px;
  }
  
  .category-child .category-count {
    font-size: 12px;
  }
}
