/* ===== Products UI Groups ===== */

.products-ui-group {
  position: relative;
  width: max-content;
  min-width: max-content;
  margin: 0 0 10px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #313131;
  box-sizing: border-box;
}

.products-ui-group--activity-open {
  z-index: 60;
}

.products-ui-group--rating-open {
  z-index: 60;
}

.products-ui-group__head {
  position: sticky;
  left: 0;
  z-index: 8;
  display: block;
  width: fit-content;
  min-width: 0;
  margin-bottom: 6px;
}

.products-ui-group.is-collapsed .products-ui-group__head {
  margin-bottom: 0;
}

.products-ui-group__toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: max-content;
  min-width: 0;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 30px;
  padding: 0px 12px;
  border: 0;
  border-radius: 8px;
  background: #313131;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    transform 140ms ease;
}

.products-ui-group__toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.products-ui-group__toggle:active {
  transform: scale(0.995);
}

.products-ui-group__toggle:disabled {
  cursor: default;
}

.products-ui-group__arrow {
  position: relative;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  opacity: 0.9;
}

.products-ui-group__arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(255, 255, 255, 0.82);
  border-bottom: 2px solid rgba(255, 255, 255, 0.82);
  transform: translate(-50%, -50%) rotate(-135deg);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.products-ui-group__toggle[aria-expanded="false"] .products-ui-group__arrow::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.products-ui-group__title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.96);
  white-space: nowrap;
}

.products-ui-group__count {
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.72);
}

.products-ui-group__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  height: auto;
  opacity: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.products-ui-group.is-collapsed .products-ui-group__body {
  height: 0;
  opacity: 0;
  overflow: hidden;
}
