.x-group {
  vertical-align: top;
  isolation: isolate;
  align-items: stretch;
  display: inline-flex;
}

.x-group > :is(.x-text-input, .x-select) {
  flex: auto;
  min-width: 0;
}

.x-group > :is(.x-button, .x-text-input, .x-select, .x-toggle) {
  z-index: 0;
  position: relative;
}

.x-group > :is(.x-button, .x-text-input, .x-select, .x-toggle):where(:hover, :focus-within) {
  z-index: 1;
}

.x-group > :is(.x-button, .x-text-input, .x-select, .x-toggle):not(:first-child) {
  margin-inline-start: -1px;
}

.x-group > :is(.x-button, .x-text-input, .x-select, .x-toggle):not(:last-child) {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.x-group > :is(.x-button, .x-text-input, .x-select, .x-toggle):not(:first-child) {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.x-group > .x-text-input:not(:last-child) > input {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.x-group > .x-text-input:not(:first-child) > input {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.x-group > .x-button[data-variant="solid"] + .x-button[data-variant="solid"] {
  box-shadow: inset 1px 0 0 0
    color-mix(in srgb, var(--accent-contrast) 20%, transparent);
}

[dir="rtl"] .x-group > .x-button[data-variant="solid"] + .x-button[data-variant="solid"] {
  box-shadow: inset -1px 0 0 0
    color-mix(in srgb, var(--accent-contrast) 20%, transparent);
}

@media (forced-colors: active) {
  .x-group > :is(.x-button, .x-text-input, .x-select, .x-toggle):not(:first-child) {
    border-inline-start: 1px solid buttontext;
    margin-inline-start: 0;
  }
}
