/* Square, fine dashed frames. Only existing framed elements receive the marker;
   zero-width edges stay zero and borderless layout wrappers stay borderless. */
/* The inert ID arm supplies specificity for existing ID-scoped !important
   component overrides; the actual matching arm remains the mounted class. */
:is(#ws-dashed-frame-scope#ws-dashed-frame-scope, .ws-dashed-frames).ws-dashed-frames.ws-dashed-frames.ws-dashed-frames .ws-dashed-frame,
:is(#ws-dashed-frame-scope#ws-dashed-frame-scope, .ws-dashed-frames).ws-dashed-frames.ws-dashed-frames.ws-dashed-frames.ws-dashed-frame {
  border-style: dashed !important;
  border-top-width: min(1px, var(--ws-frame-top, 0px)) !important;
  border-right-width: min(1px, var(--ws-frame-right, 0px)) !important;
  border-bottom-width: min(1px, var(--ws-frame-bottom, 0px)) !important;
  border-left-width: min(1px, var(--ws-frame-left, 0px)) !important;
  border-radius: 0 !important;
  /* Old inset shadows acted as a second solid/thick selection border. */
  box-shadow: none !important;
}
:is(#ws-dashed-frame-scope#ws-dashed-frame-scope, .ws-dashed-frames).ws-dashed-frames.ws-dashed-frames.ws-dashed-frames :is(button, input, select, textarea, [tabindex]):focus-visible {
  outline: 1px dashed currentColor !important;
  outline-offset: 2px !important;
}
/* Filled, borderless controls still need square silhouettes, but gain no border. */
:is(#ws-dashed-frame-scope#ws-dashed-frame-scope, .ws-dashed-frames).ws-dashed-frames.ws-dashed-frames.ws-dashed-frames :is(button, summary, select, textarea, dialog, fieldset,
  input:not([type="range"]), .ws-panel, .sl-card, .ws-export-drawer,
  .ws-object-properties, .ws-cell-popover) {
  border-radius: 0 !important;
}
/* Keep native semantics, keyboard interaction and checked/disabled state. The
   switch's hidden input remains hidden; only its visible surface changes. */
.ws-dashed-frames input:is([type="checkbox"], [type="radio"]):not(.sl-switch-row input) {
  appearance: none;
  -webkit-appearance: none;
  inline-size: 13px;
  block-size: 13px;
  flex: 0 0 13px;
  padding: 0 !important;
  border: 1px dashed currentColor !important;
  border-radius: 0 !important;
  background: var(--ds-color-surface, #fff);
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
}
.ws-dashed-frames input:is([type="checkbox"], [type="radio"]):not(.sl-switch-row input)::before {
  content: "";
  inline-size: 7px;
  block-size: 7px;
  background: currentColor;
  transform: scale(0);
}
.ws-dashed-frames input:is([type="checkbox"], [type="radio"]):checked::before,
.ws-dashed-frames input[type="checkbox"]:indeterminate::before { transform: scale(1); }
.ws-dashed-frames input[type="checkbox"]:indeterminate::before { block-size: 2px; }
.ws-dashed-frames input:is([type="checkbox"], [type="radio"]):disabled { opacity: .45; }
.ws-dashed-frames .sl-switch-ui,
.ws-dashed-frames .sl-switch-ui::after {
  box-sizing: border-box;
  border: 1px dashed currentColor !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.ws-dashed-frames .sl-switch-row input:focus-visible + .sl-switch-ui {
  outline: 1px dashed currentColor;
  outline-offset: 2px;
}
/* Legacy cached zoom markup must not resurrect extra controls. */
#zoomControls :is([data-action="zoom-out"], [data-action="zoom-in"], [data-role="zoom-slider"]),
#zoomControls .ws-slider-inline:has([data-role="zoom-slider"]),
#ws-top-ref-opacity .ws-slider-number,
#ws-ref-opacity-value { display: none !important; }
