:root {
  --smart-grid-radius: 10px;
  --smart-grid-surface: var(--white-color, #fff);
  --smart-grid-accent: var(--secondary-color, var(--global-turquoise, #3aafc3));
  --smart-grid-preview-border: color-mix(in srgb, var(--smart-grid-accent) 65%, transparent);
  --smart-grid-preview-fill: color-mix(in srgb, var(--smart-grid-accent) 8%, transparent);
  --smart-grid-invalid: var(--danger-color, var(--global-red, #eb5757));
}

html[color-theme=dark] {
  --smart-grid-surface: var(--gray-600, #292932);
}

.smart-grid {
  position: relative;
  width: 100%;
  min-height: 100px;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
  background: var(--background-color, #f5f5f5);
  border-radius: var(--smart-grid-radius);
}
.smart-grid.disable-anim, .smart-grid.disable-anim * {
  transition: none !important;
  animation: none !important;
}
.smart-grid .smart-grid-helper-overlay {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.smart-grid .smart-grid-helper-vline,
.smart-grid .smart-grid-helper-hline {
  position: absolute;
  background: var(--gray-500, #c5c8d0);
}
.smart-grid .smart-grid-helper-vline {
  top: 0;
  bottom: 0;
  width: 1px;
}
.smart-grid .smart-grid-helper-hline {
  left: 0;
  right: 0;
  height: 1px;
}

.smart-grid-component {
  position: absolute;
  box-sizing: border-box;
  border-radius: var(--smart-grid-radius);
  overflow: hidden;
  background: var(--smart-grid-surface);
  color: var(--text-color-primary, #33415c);
  border: 1px solid var(--gray-500, #c5c8d0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
}
.smart-grid-component.ghost {
  margin: 0 !important;
  transform: none !important;
  translate: none !important;
  box-sizing: border-box !important;
}
.smart-grid-component.ghost > .smart-grid-resize-handle {
  visibility: hidden;
}
.smart-grid-component.no-transition {
  transition: none !important;
}
.smart-grid-component:not(.dragging):not(.resizing):not(.ghost) {
  transition: left 0.17s, top 0.17s, width 0.17s, height 0.17s;
}
.smart-grid-component.dragging {
  z-index: 1001;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  border-color: var(--smart-grid-preview-border);
  opacity: 1;
}
.smart-grid-component.dragging > .smart-grid-drag-handle {
  cursor: grabbing;
}
.smart-grid-component.resizing {
  z-index: 1002;
  border-color: var(--smart-grid-preview-border);
}
.smart-grid-component.resizing-highlight {
  box-shadow: inset 0 0 0 1px var(--smart-grid-preview-border);
}
.smart-grid-component .smart-grid {
  background: transparent;
  border-radius: inherit;
}
.smart-grid-component > .smart-grid-drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 35px;
  box-sizing: border-box;
  padding: 0 20px;
  background: color-mix(in srgb, var(--smart-grid-surface) 97%, var(--text-color-primary, #33415c));
  border-bottom: 1px solid var(--gray-500, #c5c8d0);
  cursor: grab;
  z-index: 12;
  border-radius: calc(var(--smart-grid-radius) - 1px) calc(var(--smart-grid-radius) - 1px) 0 0;
  display: flex;
  align-items: center;
}
.smart-grid-component > .smart-grid-drag-handle p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}
.smart-grid-component > .smart-grid-drag-handle .border {
  border: 0;
}
.smart-grid-component[data-movement-locked=true] > .smart-grid-drag-handle {
  cursor: default;
}
.smart-grid-component > .smart-grid-component-content {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}
.smart-grid-component:hover > .smart-grid-resize-handle, .smart-grid-component:focus-within > .smart-grid-resize-handle, .smart-grid-component.selected > .smart-grid-resize-handle, .smart-grid-component.is-selected > .smart-grid-resize-handle, .smart-grid-component[aria-selected=true] > .smart-grid-resize-handle, .smart-grid-component.resizing > .smart-grid-resize-handle {
  opacity: 1;
}

.smart-grid-frame-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  border-radius: var(--smart-grid-radius);
  z-index: 1;
  display: none;
}

.smart-grid-frame-label {
  position: absolute;
  right: 8px;
  bottom: 6px;
  background: var(--smart-grid-surface);
  color: var(--gray-200, #5c677d);
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--gray-500, #c5c8d0);
  border-radius: 6px;
  z-index: 30;
  pointer-events: none;
  user-select: none;
}

.smart-grid-resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: transparent;
  color: var(--gray-300, #7d8597);
  opacity: 0.5;
  z-index: 1003;
  touch-action: none;
}
.smart-grid-resize-handle::before, .smart-grid-resize-handle::after {
  content: "";
  position: absolute;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  pointer-events: none;
}
.smart-grid-resize-handle::before {
  width: 9px;
  right: 1px;
  bottom: 6px;
}
.smart-grid-resize-handle::after {
  width: 5px;
  right: 1px;
  bottom: 3px;
}
.smart-grid-resize-handle.nw {
  left: 2px;
  top: 2px;
  transform: rotate(180deg);
  cursor: nwse-resize;
}
.smart-grid-resize-handle.ne {
  right: 2px;
  top: 2px;
  transform: rotate(-90deg);
  cursor: nesw-resize;
}
.smart-grid-resize-handle.sw {
  left: 2px;
  bottom: 2px;
  transform: rotate(90deg);
  cursor: nesw-resize;
}
.smart-grid-resize-handle.se {
  right: 2px;
  bottom: 2px;
  cursor: nwse-resize;
}

.smart-grid-snap-border,
.smart-grid-resize-ghost,
.smart-grid-component.placeholder,
.smart-grid-component.resize-ghost,
.smart-grid-component.dragging-ghost,
.smart-grid-component.new-ghost,
.drag-ghost {
  box-sizing: border-box;
  border-radius: var(--smart-grid-radius);
  border: 2px solid var(--smart-grid-preview-border);
  background: var(--smart-grid-preview-fill);
  color: var(--text-color-primary, #33415c);
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
  transition: none;
}

.smart-grid-snap-border {
  transition: translate 0.18s ease;
}

.smart-grid-resize-ghost,
.smart-grid-component.placeholder {
  z-index: 10020 !important;
}

.smart-grid-resize-live-border {
  box-sizing: border-box;
  border: 2px solid var(--smart-grid-preview-border);
  border-radius: var(--smart-grid-radius);
  background: transparent !important;
  z-index: 100010;
  pointer-events: none;
}

.dragging-source,
.sidebar-ghost {
  pointer-events: none;
}

.drag-ghost {
  z-index: 10000 !important;
}

.new-ghost-pulse {
  animation: none;
}

.new-ghost-red {
  animation: none !important;
  border-color: var(--smart-grid-invalid);
  background: color-mix(in srgb, var(--smart-grid-invalid) 8%, transparent) !important;
}


/* Unit-aware sizing: isolate and clip each owning grid, never the Pixel anchor cell. */
.smart-grid {
  overflow: clip;
  isolation: isolate;
  /* Also clip fixed descendants whose containing block is outside this grid. */
  clip-path: inset(0);
}
.smart-grid-component[data-type="Frame"] > .smart-grid {
  position: absolute;
  top: 35px;
  left: 0;
  height: calc(100% - 35px) !important;
  min-height: 0;
}
.smart-grid-component[data-size-unit="pixel"] {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.smart-grid-component[data-size-unit="pixel"] > .smart-grid-component-content {
  position: absolute;
  box-sizing: border-box;
  background: var(--smart-grid-surface);
  overflow: hidden;
  border: 1px solid var(--gray-500, #c5c8d0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
/* Native Pixel content must not arm dragging or inherit grid gesture restrictions. */
.smart-grid:has(.smart-grid-component[data-size-unit="pixel"]) {
  touch-action: auto;
}
.smart-grid-drag-handle {
  touch-action: none;
  user-select: none;
}
/* Retain Cell content's prior touch policy when its grid also contains Pixel content. */
.smart-grid-component[data-size-unit="cell"] > .smart-grid-component-content:not(:has(.smart-grid-component[data-size-unit="pixel"])) {
  touch-action: none;
}
.smart-grid-component[data-size-unit="pixel"] > .smart-grid-component-content {
  cursor: auto;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
.smart-grid-component[data-size-unit="pixel"] > .smart-grid-component-content > .smart-grid-pixel-drag-handle {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 3px;
  background: var(--smart-grid-surface);
  color: var(--text-color-primary, #33415c);
  font-size: 12px;
  line-height: 12px;
  cursor: grab;
  z-index: 12;
  display: grid;
  place-items: center;
}

/*# sourceMappingURL=smart-grid.css.map */
