:host(:not(:is([hydrated], .hydrated))) {
  @apply not-hydrated;
}


mds-button {
  &:not(:is([hydrated], .hydrated)) {
    @apply not-hydrated;
  }
}

/* Joined-group radii are driven from the parent: mds-button-group flattens the
 * inner edges of its slotted members via ::slotted, instead of each member
 * reading its parent. Cross-browser (no :host-context); ::slotted (outer tree)
 * wins over the member's own host radius.
 *
 * The edge is decided among the MEMBERS, with `:nth-child(of S)`, and not among
 * all the children: plain `:first-child` counts whatever sits in the slot, so a
 * stray element before a single button flattened that button on the left and
 * left it rounded only on the right, and `mds-button-dropdown` - a documented
 * member - was never counted, so a [button, dropdown] pair was joined on the
 * button side only. */

::slotted(mds-button:not(:nth-child(1 of mds-button, mds-button-dropdown))),
::slotted(mds-button-dropdown:not(:nth-child(1 of mds-button, mds-button-dropdown))) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

::slotted(mds-button:not(:nth-last-child(1 of mds-button, mds-button-dropdown))),
::slotted(mds-button-dropdown:not(:nth-last-child(1 of mds-button, mds-button-dropdown))) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}


:host {
  display: inline-flex;
  gap: --spacing(50);
}

/* a host stretched by its row (actions/stacked: align-self in mds-card-footer and mds-status-bar,
   a flex-basis in mds-banner, a width) gives its free width to its labelled members, each at its
   own width plus the same share, the label in the middle (mds-button centres it): members of one
   width would cut a long label (actions, 2026-10-30), and a basis of 0 cuts it in a row of one
   line too. An icon-only member keeps its size, as the icon-only menu of stacked and the chevron
   of mds-button-dropdown do; [label] is reflected, from a label written as text too. At its own
   width the host has no free width to give, so nothing moves (#1340) */

::slotted(mds-button[label]),
::slotted(mds-button-dropdown) {
  flex-grow: 1;
}
