.group {
  padding-top: calc(calc(var(--layout-space) / 2) * var(--layout-padding));
  padding-bottom: calc(calc(var(--layout-space) / 2) * var(--layout-padding));
  padding-left: calc(var(--layout-space) * var(--layout-padding));
  padding-right: calc(var(--layout-space) * var(--layout-padding));
  width: 100%;
  display: flex;
}

.group:first-child {
  padding-top: calc(var(--layout-space) * var(--layout-padding));
}

.group:last-child {
  padding-bottom: calc(var(--layout-space) * var(--layout-padding));
}

.is-group-order-headerbody .group {
  flex-direction: column;
}

.is-group-order-bodyheader .group {
  flex-direction: column-reverse;
}

.is-group-border .group:not(:last-child):not(:only-child) {
  border-bottom: calc(var(--layout-line-width) * var(--group-border)) solid rgb(var(--theme-accent));
}

.is-group-border .group {
  padding: calc(var(--layout-space) * var(--layout-padding));
}

.group-header {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  transition: padding var(--layout-transition-extra-fast) var(--layout-duration-04);
}

.group-header-item {
  display: flex;
}

.is-group-area-justify-center .group-header-item:not(:only-child):not(:last-child),
.is-group-area-justify-left .group-header-item:not(:only-child):not(:last-child) {
  margin-right: calc(var(--layout-space) * var(--layout-gutter));
}

.is-group-area-justify-right .group-header-item:not(:only-child):not(:last-child) {
  margin-left: calc(var(--layout-space) * var(--layout-gutter));
}

.group-header-item-name {
  flex-shrink: 1;
  overflow: hidden;
}

.group-header-item-control {
  height: 0;
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  transition:
    width var(--layout-transition-extra-fast),
    height var(--layout-transition-extra-fast) var(--layout-duration-04),
    margin var(--layout-transition-extra-fast);
}

.is-edit .group-header-item-control {
  height: 2.5em;
  width: 15em;
  transition:
    width var(--layout-duration-04) var(--layout-timing-bounce) var(--layout-duration-04),
    height var(--layout-transition-extra-fast),
    margin var(--layout-duration-04) var(--layout-timing-bounce) var(--layout-duration-04);
}

.is-group-area-justify-center .group-header-item-control:not(:only-child):not(:last-child),
.is-group-area-justify-left .group-header-item-control:not(:only-child):not(:last-child) {
  margin-right: 0;
}

.is-edit.is-group-area-justify-center .group-header-item-control:not(:only-child):not(:last-child),
.is-edit.is-group-area-justify-left .group-header-item-control:not(:only-child):not(:last-child) {
  margin-right: calc(var(--layout-space) * var(--layout-gutter));
}

.is-group-area-justify-right .group-header-item-control:not(:only-child):not(:last-child) {
  margin-left: 0;
}

.is-edit.is-group-area-justify-right .group-header-item-control:not(:only-child):not(:last-child) {
  margin-left: calc(var(--layout-space) * var(--layout-gutter));
}

.is-edit .group-header {
  transition: padding var(--layout-transition-extra-fast);
}

.is-group-area-justify-left .group-header {
  flex-direction: row;
}

.is-group-area-justify-center .group-header {
  flex-direction: row;
  justify-content: center;
}

.is-group-area-justify-right .group-header {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.is-group-order-headerbody .group-header-name.group-header,
.is-group-order-headerbody .group-header-openall.group-header,
.is-group-order-headerbody.is-edit .group-header {
  padding-bottom: calc(var(--layout-space) * var(--layout-gutter));
}

.is-group-order-bodyheader .group-header-name.group-header,
.is-group-order-bodyheader .group-header-openall.group-header,
.is-group-order-bodyheader.is-edit .group-header {
  padding-top: calc(var(--layout-space) * var(--layout-gutter));
}

.group-name {
  height: 2.5em;
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  font-size: var(--group-name-size);
}

.group-name-text {
  margin-bottom: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.group-control-item {
  padding-left: 0;
  padding-right: 0;
  flex-shrink: 0;
  width: 3em;
}

.group-openall {
  font-size: var(--group-openall-size);
}

.group-openall-item {
  background-color: rgba(var(--button-background), var(--group-openall-opacity));
}

.group-openall-item:focus,
.group-openall-item:hover {
  background-color: rgba(var(--button-background-focus-hover), var(--group-openall-opacity));
}

.group-openall-item:active {
  background-color: rgba(var(--button-background-active), var(--group-openall-opacity));
}

.group-openall-item:after {
  background-color: rgba(var(--button-border), 0);
}

.group-openall-item:focus:after,
.group-openall-item:hover:after {
  background-color: rgba(var(--button-border-focus-hover), var(--group-openall-opacity));
}

.group-openall-item:active:after {
  background-color: rgb(var(--button-border-active));
}

.is-group-openall-opacity .group-openall-item:active:after {
  background-color: transparent;
}

.group-body {
  background-color: transparent;
  font-size: var(--link-item-size);
  position: relative;
  display: grid;
  grid-auto-rows: var(--link-item-height);
  grid-gap: calc(var(--layout-space) * var(--layout-gutter));
  grid-template-columns: repeat(auto-fill, minmax(var(--link-item-width), 1fr));
  grid-auto-flow: dense;
}

.is-link-area-direction-ltr .group-body {
  direction: ltr;
}

.is-link-area-direction-rtl .group-body {
  direction: rtl;
}
