.editor-items-toolbar,
.editor-item-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.editor-items-toolbar { margin-block: 8px; }
.editor-items-select { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.editor-items-select input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.editor-items-button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line, #ccd2d8);
  border-radius: 7px;
  background: var(--surface, #fff);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.editor-items-button:disabled { opacity: .48; cursor: default; }
.editor-items-button:focus-visible,
.editor-items-select input:focus-visible { outline: 2px solid var(--accent, #306ad4); outline-offset: 3px; }
.editor-items-mounted > .item-row { grid-template-columns: minmax(120px, 2fr) repeat(4, minmax(60px, 1fr)); padding: 12px; border: 1px solid var(--line, #ccd2d8); border-radius: 9px; }
.editor-items-mounted > .item-row.editor-item-selected { border-color: var(--accent, #306ad4); }
.editor-items-mounted > .item-row > .editor-item-controls { grid-column: 1 / -1; }
.editor-item-number { font-weight: 650; white-space: nowrap; }
.editor-item-controls [data-editor-items-action="handle"] { cursor: grab; }
.editor-items-help,
.editor-items-status,
.editor-items-count { font-size: .85rem; color: var(--muted, #586477); }
.editor-items-help { margin-block: 8px 12px; }
.editor-items-status:empty { display: none; }
@media (max-width: 700px) {
  .editor-items-button { min-height: 44px; min-width: 44px; }
  .editor-items-select { min-height: 44px; }
  .editor-items-mounted > .item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; }
}
@media (pointer: coarse) {
  .editor-item-controls [data-editor-items-action="handle"] { display: none; }
}
/* Native details keeps less frequent actions reachable without expanding every row. */
.editor-item-controls { flex-wrap: nowrap; }
.editor-item-controls > .editor-items-select { margin-inline-end: auto; }
.editor-item-menu { position: relative; flex-shrink: 0; }
.editor-item-menu > summary,
#content .editor-item-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  margin: 0;
  color: inherit;
  list-style: none;
  user-select: none;
}
.editor-item-menu > summary::-webkit-details-marker { display: none; }
.editor-item-menu > summary::after { content: ' ⋯'; }
.editor-item-menu-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 12;
  display: grid;
  gap: 6px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line, #ccd2d8);
  border-radius: 9px;
  background: var(--surface, #fff);
  box-shadow: 0 8px 24px #0002;
}
.editor-item-menu:not([open]) > .editor-item-menu-panel { display: none; }
.editor-item-menu-panel > button { text-align: start; }
@media (max-width: 700px) {
  .editor-item-controls [data-editor-items-action="handle"] { display: none; }
  .editor-items-mounted > .item-row > .editor-item-controls + :is(label, .entry-field-wrapper) { grid-column: 1 / -1; }
}
/* A separate outside outline marks the active row without replacing the
   selected-row border, field errors, or the browser's text selection. Native
   :focus-within follows the same row when keyboard actions move it. */
.editor-items-mounted > .item-row:focus-within {
  outline: 2px solid var(--accent, #306ad4);
  outline-offset: 3px;
}
@media (forced-colors: active) {
  .editor-items-mounted > .item-row:focus-within {
    outline-color: Highlight;
  }
}
