/*
 * Stage 15 semantic actions keep meaning/iconography separate from layout.
 * Existing page geometry is preserved unless a page-specific UX change is
 * explicitly requested. Utility and sidebar controls therefore have their own
 * shapes instead of inheriting the semantic action circle.
 */
.shx-action-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  border: 1px solid var(--primary, var(--bs-primary));
  border-radius: 50%;
  background: var(--bs-body-bg);
  color: var(--primary, var(--bs-primary));
  text-decoration: none;
  line-height: 1;
  gap: .4rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.shx-action-control:hover,
.shx-action-control:focus-visible {
  border-color: var(--primary-hover, var(--primary, var(--bs-primary)));
  color: var(--primary-hover, var(--primary, var(--bs-primary)));
  background: var(--bs-body-bg);
  background: color-mix(in srgb, var(--primary, var(--bs-primary)) 12%, var(--bs-body-bg));
  outline: 2px solid transparent;
}

.shx-action-control--primary {
  border-color: var(--primary, var(--bs-primary));
  background: var(--primary, var(--bs-primary));
  color: var(--bs-white);
}

.shx-action-control--primary:hover,
.shx-action-control--primary:focus-visible {
  border-color: var(--primary-hover, var(--primary, var(--bs-primary)));
  background: var(--primary-hover, var(--primary, var(--bs-primary)));
  color: var(--bs-white);
}

.shx-action-control--success {
  border-color: var(--bs-success);
  color: var(--bs-success);
}

.shx-action-control--danger {
  border-color: var(--bs-danger);
  color: var(--bs-danger);
}

.shx-action-control--danger:hover,
.shx-action-control--danger:focus-visible {
  border-color: var(--bs-danger);
  background: var(--bs-danger);
  color: var(--bs-white);
}

/* Labeled actions remain ordinary rounded buttons, never pill controls. */
.shx-action-control--labeled {
  width: auto;
  height: auto;
  min-height: 2.5rem;
  min-width: 2.5rem;
  padding: .45rem .8rem;
  border-radius: var(--btn-radius, var(--bs-border-radius, .375rem));
  font-size: var(--bs-btn-font-size, .875rem);
}

.shx-inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

/*
 * Global Theme/Language/Help controls keep the established neutral circular
 * shell. Only their graphical foreground and interactive accent follow the
 * active theme primary token.
 */
.shx-utility-button,
.shx-page-utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-body-bg);
  color: var(--primary, var(--bs-primary));
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.shx-utility-button:hover,
.shx-utility-button:focus-visible,
.shx-page-utility-button:hover,
.shx-page-utility-button:focus-visible {
  border-color: var(--primary, var(--bs-primary));
  background: var(--bs-primary-bg-subtle, var(--bs-tertiary-bg));
  color: var(--primary-hover, var(--primary, var(--bs-primary)));
  outline: none;
}

.shx-utility-button .shx-icon,
.shx-page-utility-button .shx-icon {
  margin-right: 0;
  font-size: 1.25rem;
}

/*
 * Sidebar collapse recreates the established wide rounded rectangle. The
 * geometry mirrors the former menu-item/border/rounded control; only the
 * graphical foreground is theme-aware.
 */
.shx-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.5rem;
  padding: .5rem 1.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius, .375rem);
  background: var(--bs-tertiary-bg);
  color: var(--primary, var(--bs-primary));
  line-height: 1;
  margin-left: 1.5rem;
  margin-bottom: .5rem;
  transition: background-color .15s ease, color .15s ease;
}

.shx-sidebar-toggle:hover,
.shx-sidebar-toggle:focus-visible {
  background: var(--bs-gray-200);
  color: var(--primary-hover, var(--primary, var(--bs-primary)));
  outline: none;
}

.shx-sidebar-toggle i {
  width: 24px;
  height: 24px;
  font-size: 1.25rem;
  transition: transform .4s ease;
}
