/* Drawn inside the canvas iframe, which PDS tokens never reach (see P1App's canvas
 * isolation note), so every token carries a fallback. */

/* Puck bounds this row's width by the block's, so on a narrow block the Zappy button and
 * the bar wrap rather than clip. */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

/* Puck's ActionBar and its actions, matched by the stable part of their hashed class names. */
.row > [class*='_ActionBar_'] {
  align-items: stretch;
  min-height: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pds-color-foreground-default, oklch(0.2178 0 0));
  color: var(--pds-color-foreground-reverse, oklch(1 0 0));
  box-shadow: var(--pds-elevation-raised, 0 0 0 1px rgb(0 0 0 / 8%), 0 2px 2px 0 rgb(0 0 0 / 4%), 0 8px 8px -8px rgb(0 0 0 / 4%));
}

.label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: var(--pds-typography-fw-semibold, 600);
  white-space: nowrap;
  color: var(--pds-color-foreground-reverse, oklch(1 0 0));
}

.row [class*='_ActionBarAction_'],
.action {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0;
  background: transparent;
  color: rgb(255 255 255 / 80%);
  cursor: pointer;
}

.row [class*='_ActionBarAction_']:hover:not(:disabled),
.action:hover {
  background: rgb(255 255 255 / 12%);
  color: var(--pds-color-foreground-reverse, oklch(1 0 0));
}

.row [class*='_ActionBarAction_']:focus-visible,
.action:focus-visible {
  outline: 2px solid var(--pds-color-interactive-reverse-focus, oklch(1 0 0));
  outline-offset: -2px;
}

.row [class*='_ActionBarAction--disabled_'] {
  cursor: default;
  opacity: 0.5;
}

.row [class*='_ActionBarAction--active_'] {
  color: var(--pds-color-foreground-reverse, oklch(1 0 0));
}

/* Puck's parent action sits before the label, so it needs no divider of its own. */
.row [class*='_ActionBar_'] > [class*='_ActionBarAction_']:first-child {
  border-inline-start: 0;
}

.zappy {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--pds-color-border-default, oklch(0.925 0 0));
  border-radius: 8px;
  background: var(--pds-color-surface-default, oklch(1 0 0));
  color: var(--pds-color-foreground-default, oklch(0.2178 0 0));
  box-shadow: var(--pds-elevation-raised, 0 0 0 1px rgb(0 0 0 / 8%), 0 2px 2px 0 rgb(0 0 0 / 4%), 0 8px 8px -8px rgb(0 0 0 / 4%));
  cursor: pointer;
}

.zappy:hover {
  background: var(--pds-color-interactive-background-hover, rgb(0 0 0 / 5%));
}

.zappy:focus-visible {
  outline: 2px solid var(--pds-color-interactive-focus, oklch(0.55 0.2 260));
  outline-offset: 2px;
}
