/* Shared Playbook spacing. Keep layouts, colours and component behaviour intact. */
:root {
  --bw-space-small: 6px;
  --bw-space-medium: 10px;
  --bw-space-large: 14px;
}

:where(main, dialog, .module-frame, .sp-main, body.bw-specialist) :is(h1, h2, h3) {
  margin-block-start: 0;
  margin-block-end: var(--bw-space-medium);
  line-height: 1.2;
}

body :is(main, .sp-main, .module-frame) {
  padding-block: var(--bw-space-large);
}

body :is(.card, .panel, .sp-panel, .search-panel, .notice, .callout, .standard, .essentials) {
  padding: var(--bw-space-large);
  border-radius: 6px;
}

body :is(.card, .panel, .sp-panel, .search-panel) {
  margin-block: var(--bw-space-medium);
}

body :is(.grid, .columns, .fields, .sp-fields, .sp-workspace, .standard-grid, .essential-grid) {
  gap: var(--bw-space-medium);
}

body :is(.actions, .sp-actions, .controls, .filters, .row-actions, .tabs, .sp-tabs, .pager) {
  gap: var(--bw-space-small);
}

body :is(button, input:is([type="submit"], [type="button"]), a:is(.button, .btn, .admin-exit)) {
  min-height: 28px;
  padding: 4px 9px;
  line-height: 1.3;
  border-radius: 5px;
}

body :is(select, input:not([type]), input:is([type="text"], [type="search"], [type="email"],
  [type="password"], [type="number"], [type="date"], [type="tel"], [type="url"])) {
  min-height: 30px;
  padding: 4px 8px;
  line-height: 1.35;
}

body :is(table th, table td) {
  padding: 4px 8px;
  vertical-align: middle;
}

body :is(.table, .table-scroll, .table-wrap, .sp-table-scroll) {
  overflow-x: auto;
}

@media (pointer: coarse) {
  body :is(button, input:is([type="submit"], [type="button"]), a:is(.button, .btn, .admin-exit),
    select, input:not([type]), input:is([type="text"], [type="search"], [type="email"],
    [type="password"], [type="number"], [type="date"], [type="tel"], [type="url"])) {
    min-height: 36px;
  }
}
