btu-cig-cluster {
  @apply blokk flex-grow basis-full contain-layout contain-style;
}

btu-cig-cluster:state(btu-error) {
  > .CIG-title .CIG-titleText {
    @apply text-error-600 after:btu-icon after:btu-icon-circle-alert after:ms-1 after:align-middle;
  }
}

btu-cig-cluster:state(btu-expanded) {
  > .CIG-title {
    @apply cursor-[unset] bg-primary-50 hover:bg-primary-50;
  }

  > .CIG-title .CIG-titleToggle {
    @apply btu-button-pressed text-primary-800 before:-rotate-180;
  }
}

btu-cig-cluster > *:not(.CIG-title):not(.is-filterResult) {
  @apply [content-visibility:hidden];
}

btu-cig-cluster:state(btu-expanded) > *:not(.CIG-title) {
  @apply [content-visibility:unset];
}

btu-cig-cluster .CIG-title {
  @apply mt-6 cursor-pointer rounded-lg bg-gray-50 p-0 text-sm font-semibold [inline-size:100%] hover:bg-gray-100;

  &:empty {
    @apply hidden;
  }
}

btu-cig-cluster .CIG-titleText {
  @apply text-sm font-semibold text-gray-900;
}

btu-cig-cluster .CIG-titleToggle {
  @apply btu-button btu-button-text-hidden btu-button-xs bg-white before:btu-icon before:btu-icon-chevron-down before:transition;
}

btu-cig-cluster .CIG-title button {
  @apply flex w-full items-center justify-between gap-2 rounded-lg border-0 p-2 normal-case;
}

btu-cig-cluster .CIG-row {
  @apply px-2; /* clustered rows are indented. */
}

/* Nested cluster side gaps */
.CIG-row btu-cig-cluster {
  @apply px-2;
}

.is-inHiddenCluster {
  @apply hidden;
}
