.composer-unit-note {
  margin: -8px 0 12px;
  color: #718079;
  font-size: 11px;
}

body.normal-image-workbench [data-pixel-only] {
  display: none !important;
}

#page-composer .composer {
  grid-template-columns: var(--composer-sidebar-width, 280px) 10px minmax(0, 1fr) !important;
  gap: 0 !important;
}

#page-composer .composer aside {
  min-width: 0;
}

.composer-sidebar-resizer {
  position: relative;
  z-index: 2;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}

.composer-sidebar-resizer::before {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 4px;
  height: 42px;
  border-radius: 4px;
  background: #b8c5b8;
  content: '';
  opacity: .55;
  transform: translateY(-50%);
  transition: background .14s ease, opacity .14s ease;
}

.composer-sidebar-resizer:hover::before,
.composer-sidebar-resizer:focus-visible::before,
body.composer-resizing .composer-sidebar-resizer::before {
  background: #477f62;
  opacity: 1;
}

body.composer-resizing,
body.composer-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.composer-assets {
  --composer-asset-card-size: 136px;
  grid-template-columns: repeat(auto-fill, var(--composer-asset-card-size));
  justify-content: start;
  gap: 8px;
}

.composer-assets .draggable-asset {
  width: var(--composer-asset-card-size);
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.composer-assets .draggable-asset:not(.is-animation-strip) img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
}

.composer-assets .draggable-asset.is-animation-strip {
  grid-column: auto;
  width: var(--composer-asset-card-size);
  padding: 6px;
}

.composer-assets .draggable-asset.is-animation-strip .animation-strip-preview {
  width: 112px;
  height: 112px;
  margin: 0 auto;
}

.composer-assets .draggable-asset small {
  display: block;
  margin-top: 3px;
  color: #718079;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.35;
}

.composer-assets .draggable-asset.is-animation-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 1;
  object-fit: contain;
  image-rendering: pixelated;
  border: 1px solid #d4ddd0;
  border-radius: 5px;
  background: repeating-conic-gradient(#e6ece5 0 25%, #fbfcf8 0 50%) 50% / 12px 12px;
}

.animation-strip-preview {
  display: block;
  width: 100%;
  height: 100%;
  background-image: var(--strip-image);
  background-repeat: no-repeat;
  background-position: 0 50%;
  background-size: 400% 100%;
  image-rendering: pixelated;
}

.draggable-asset.is-animation-strip .animation-strip-preview {
  aspect-ratio: 1 / 1;
  border: 1px solid #d4ddd0;
  border-radius: 5px;
  background-color: #f7faf4;
  background-size: 400% 100%;
}

.atlas-cell .animation-strip-preview {
  width: var(--cell-height, 64px);
  height: 100%;
  margin: 0 auto;
}

.draggable-asset.is-animation-strip:hover .animation-strip-preview {
  animation: animation-strip-preview 1.2s steps(4, end) infinite;
}

.draggable-asset.is-incompatible {
  cursor: not-allowed;
  opacity: .4;
  filter: grayscale(.35);
}

@keyframes animation-strip-preview {
  to { background-position: 133.333% 50%; }
}

.composer-assets-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 8px;
  color: #7a8780;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.atlas-grid {
  grid-template-columns: repeat(var(--columns), var(--cell-width, 64px)) !important;
  grid-template-rows: repeat(var(--rows), var(--cell-height, 64px));
  isolation: isolate;
}

.atlas-cell {
  position: relative;
  width: var(--cell-width, 64px) !important;
  height: var(--cell-height, 64px) !important;
  min-height: var(--cell-height, 64px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.atlas-cell.occupied {
  z-index: 1;
  cursor: grab;
  background: repeating-conic-gradient(#e6ece5 0 25%, #fbfcf8 0 50%) 50% / 12px 12px;
}

.atlas-cell.occupied:active {
  cursor: grabbing;
}

.atlas-cell img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.atlas-cell span {
  position: absolute;
  right: 3px;
  bottom: 2px;
  left: 3px;
  overflow: hidden;
  color: #294f3e;
  font-size: 8px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
}

.atlas-cell:hover span {
  opacity: .88;
}

.animation-atlas-grid .atlas-cell {
  border-color: #91ad92;
}

.animation-atlas-grid .atlas-cell.occupied {
  box-shadow: inset 0 0 0 2px rgba(213, 164, 62, .42);
}

#atlas-info[data-state="error"] {
  color: #a34941;
}

body.workflow-dark-mode .composer-unit-note,
body.workflow-dark-mode .composer-assets .draggable-asset small,
body.workflow-dark-mode .composer-assets-empty {
  color: #93a79d;
}

body.workflow-dark-mode .composer-assets .draggable-asset.is-animation-strip img,
body.workflow-dark-mode .atlas-cell.occupied {
  border-color: #455a51;
  background: repeating-conic-gradient(#26312e 0 25%, #19211f 0 50%) 50% / 12px 12px;
}

body.workflow-dark-mode .atlas-cell span {
  color: #e7f0ea;
}

body.workflow-dark-mode .composer-sidebar-resizer::before {
  background: #789585;
}

@media (max-width: 720px) {
  #page-composer .composer {
    grid-template-columns: 1fr !important;
  }

  .composer-sidebar-resizer {
    display: none;
  }
}
