/* SiteForge v8 — unified SVG icon system */
.sf-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.icon-btn .sf-icon,
.v8-sheet-close .sf-icon {
  width: 18px;
  height: 18px;
}

.icon-btn.small .sf-icon,
.structure-action .sf-icon,
.mini-action .sf-icon {
  width: 16px;
  height: 16px;
}

.device-btn {
  gap: 8px !important;
}
.device-btn .sf-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}
.device-btn.active .sf-icon {
  filter: drop-shadow(0 0 7px rgba(255,255,255,.16));
}

.search-box > .sf-icon,
.v8-command-head > .sf-icon {
  width: 18px;
  height: 18px;
  color: #94a7d4;
}

.structure-handle .sf-icon {
  width: 18px;
  height: 18px;
  color: #7788ae;
}

.v8-command-icon {
  display: grid !important;
  place-items: center;
}
.v8-command-icon .sf-icon {
  width: 18px;
  height: 18px;
}

.sf-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sf-icon-text > .sf-icon {
  width: 16px;
  height: 16px;
}

.add-item-btn .sf-icon,
#newProjectBtn .sf-icon,
#v8AddFab .sf-icon,
#v8CheckFab .sf-icon {
  width: 16px;
  height: 16px;
}

/* Strict optical centering for icon-only controls.
   Legacy button styles used line-height/padding intended for text,
   which made SVG icons drift from the visual center. */
.icon-btn,
.structure-action,
.mini-action,
.v8-sheet-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.icon-btn:has(> .sf-icon),
.structure-action:has(> .sf-icon),
.mini-action:has(> .sf-icon),
.v8-sheet-close:has(> .sf-icon) {
  padding: 0 !important;
  text-indent: 0 !important;
}

.icon-btn > .sf-icon,
.structure-action > .sf-icon,
.mini-action > .sf-icon,
.v8-sheet-close > .sf-icon {
  margin: 0 !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  vertical-align: middle !important;
}

.v8-sheet-close,
.icon-btn[data-close-modal],
#rightCloseBtn {
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
}

@media (max-width: 760px) {
  .device-btn { gap: 6px !important; }
  .device-btn .sf-icon { width: 16px; height: 16px; }
}
