/* =========================================
   Dashboard grid
========================================= */

/* Floats over the dashboard and follows it while scrolling. `fixed` resolves against .row-container
   rather than the viewport — container-type: inline-size makes it a containing block — so this stays
   clear of the sidebar and the chat panel instead of spanning the whole window. */
.dashboard-edit-panel {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1020;
  margin: 0;
  width: auto;
}

/* A widget's lock state lives on the .grid-stack-item, so it survives the widget re-rendering itself —
   which means the toggle can't hold it. Both icons render; the controller re-derives aria-pressed from
   the item on connect, and that picks which one shows. */
.dashboard-widget__lock .dashboard-widget__when-locked,
.dashboard-widget__lock[aria-pressed='true'] .dashboard-widget__when-unlocked {
  display: none;
}

.dashboard-widget__lock[aria-pressed='true'] .dashboard-widget__when-locked {
  display: inline-block;
}

/* Reads as pinned rather than merely un-draggable. */
.grid-stack-item--move-locked > .grid-stack-item-content {
  outline: var(--tblr-border-width) dashed var(--tblr-border-color);
  outline-offset: calc(-1 * var(--tblr-border-width));
}
