.canvas-area._view-frame-mode {
  cursor: crosshair;
}

/* View frame visuals mirror .ui-sheet-frame: solid stroke at the same
   weight as a sheet's paper outline, thicker when selected. No dashes
   anywhere — neither for the source-canvas variant, nor for the live
   draw preview. The view is meant to read as "another sheet on this
   canvas", so it picks up the exact same border + title conventions. */
.ui-view-frame__rect {
  fill: none;
  stroke: var(--arhix-document-selection);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ui-view-frame__hit-area {
  fill: none;
  stroke: transparent;
  stroke-width: 20;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.ui-view-frame._selected .ui-view-frame__rect {
  stroke-width: 2;
}

.ui-view-frame:not(._source):not(._preview) .ui-view-frame__rect {
  stroke: var(--arhix-document-muted);
  opacity: 0.55;
}

[data-text-frame].ui-view-frame .ui-view-frame__rect {
  stroke: var(--arhix-document-muted);
  opacity: 0.55;
}

[data-text-frame].ui-view-frame._selected .ui-view-frame__rect {
  stroke: var(--arhix-document-selection);
  opacity: 1;
}

[data-text-frame].ui-view-frame._sticky._selected .ui-view-frame__rect {
  stroke: #9A9A9A;
  stroke-width: 2;
  opacity: 0.2;
}

[data-text-frame].ui-view-frame._selected:not(._sticky)[data-selection-overlay][data-text-editing-source-hidden="true"] .ui-view-frame__rect {
  opacity: 0;
}

[data-text-frame].ui-view-frame._has-frame-stroke:not(._selected) .ui-view-frame__rect {
  opacity: 0;
}

[data-text-frame][data-text-editing-source-hidden="true"] [data-text-content="true"],
[data-text-frame][data-text-editing-source-hidden="true"] [data-text-inline-backgrounds="true"],
[data-text-content="true"][data-text-editing-source-hidden="true"] {
  opacity: 0;
}

[data-text-frame][data-text-editing-source-hidden="true"] [data-text-placeholder="true"],
[data-leader-entity="true"][data-text-editing-source-hidden="true"] [data-leader-placeholder="true"] {
  opacity: 0;
}

[data-leader-label][data-leader-text][data-text-editing-source-hidden="true"] {
  opacity: 0;
}

[data-leader-entity="true"][data-selection-overlay][data-text-editing-source-hidden="true"] {
  opacity: 0;
}

[data-table-cell-text="true"][data-text-editing-source-hidden="true"] {
  opacity: 0;
}

[data-selection-overlay][data-source-entity-id][data-text-editing-source-hidden="true"] {
  opacity: 0;
}

.ui-view-frame:not(._source):not(._preview) .ui-view-frame__title {
  fill: var(--arhix-document-muted);
  opacity: 0.65;
}

.ui-view-frame._source._inactive .ui-view-frame__rect {
  stroke: var(--arhix-document-muted);
  opacity: 0.55;
}

.ui-view-frame._source._inactive .ui-view-frame__title {
  fill: var(--arhix-document-muted);
  opacity: 0.65;
}

.ui-view-frame._preview .ui-view-frame__rect {
  opacity: 0.6;
  pointer-events: none;
}

.ui-view-frame._preview .ui-view-frame__hit-area {
  pointer-events: none;
}

.ui-view-frame__title {
  fill: var(--arhix-document-selection);
  pointer-events: none;
}

.ui-view-frame__contents {
  pointer-events: none;
}

body:not(.presentation-mode) .canvas-area._hide-view-frames .ui-view-frame__rect,
body:not(.presentation-mode) .canvas-area._hide-view-frames .ui-view-frame__hit-area,
body:not(.presentation-mode) .canvas-area._hide-view-frames .ui-view-frame__title,
body:not(.presentation-mode) .canvas-area._hide-view-frames .ui-frame-title-placeholder {
  display: none;
}
