aside {
  width: 100vw;
  left: -100vw;
}

.app-view-hidden {
  display: none !important;
}

#builderView > main {
  padding-top: 5.5rem;
}

#builderView.sidebar-expanded > aside {
  width: 100vw !important;
  max-width: none !important;
  left: 0 !important;
  z-index: 40;
  overflow-y: auto;
}

#builderView.sidebar-expanded > main {
  position: fixed;
  inset: 0;
  display: block;
  padding: 0;
  pointer-events: none;
  background: transparent;
}

#builderView.sidebar-expanded > main > section,
#builderView.sidebar-expanded > main > label {
  display: none;
}

#builderView.sidebar-expanded .builder-toolbar {
  left: 0 !important;
  pointer-events: auto;
}

#sidebar-toggle:checked ~ aside {
  left: 0 !important;
}

#sidebar-toggle:checked ~ .overlay,
#modal-toggle:checked ~ .overlay {
  display: block !important;
}

#modal-toggle:checked ~ .modal {
  display: flex !important;
}

#modal-toggle:checked ~ .modal-overlay {
  display: block;
}

@media (min-width: 768px) {
  aside {
    width: clamp(305px, 30vw, 600px);
    left: 0 !important;
  }

  .overlay {
    display: none !important;
  }
}

@media (max-width: 767px) {
  #modal-toggle:checked ~ aside {
    left: -100vw !important;
  }
}

.viewer-shell {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.viewer-canvas,
.viewer-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.viewer-canvas {
  background: #ffffff;
}

.viewer-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: #94a3b8;
  background: repeating-linear-gradient(
    45deg,
    rgba(148, 163, 184, 0.08),
    rgba(148, 163, 184, 0.08) 12px,
    rgba(255, 255, 255, 0.8) 12px,
    rgba(255, 255, 255, 0.8) 24px
  );
}

.viewer-canvas.hidden,
.viewer-placeholder.hidden {
  display: none;
}

.value-editor.is-open {
  display: flex !important;
}

.action-editor.is-open {
  display: flex !important;
}

.contact-point-editor.is-open {
  display: flex !important;
}

.contact-point-viewer-shell {
  position: relative;
  min-height: 360px;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
}

.contact-point-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr);
}

.contact-point-divider {
  width: 8px;
  cursor: col-resize;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
}

.contact-point-divider:hover {
  background: #64748b;
}

@media (max-width: 767px) {
  .contact-point-layout {
    display: flex;
    flex-direction: column;
  }
}

.value-editor-tab-active {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.action-editor-tab-active {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.color-swatch,
.texture-swatch {
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.color-swatch:hover,
.texture-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.16);
}

.texture-grid {
  background-color: #e2e8f0;
  background-image: linear-gradient(#64748b 1px, transparent 1px), linear-gradient(90deg, #64748b 1px, transparent 1px);
  background-size: 14px 14px;
}

.texture-dots {
  background-color: #f8fafc;
  background-image: radial-gradient(#475569 2px, transparent 2px);
  background-size: 14px 14px;
}

.texture-stripes {
  background: repeating-linear-gradient(45deg, #cbd5e1 0, #cbd5e1 8px, #64748b 8px, #64748b 12px);
}

