.template-replace-grid,
.template-asset-slots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-replace-card {
  min-width: 0;
  padding: 14px;
  border: 1px dashed rgba(46, 168, 118, .42);
  background: linear-gradient(180deg, #fbfdf9 0%, #fffef8 100%);
}

.template-replace-card .template-slot-head {
  margin-bottom: 10px;
}

.template-replace-card-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #f3f7f4;
}

.template-replace-card-media img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: #f7faf8;
}

.template-replace-card-media > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 6px;
  color: #fff;
  background: rgba(10, 24, 17, .68);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-replace-card-empty {
  display: grid;
  gap: 8px;
  color: var(--accent-hover);
  place-items: center;
}

.template-replace-card-actions {
  min-height: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 12px;
}

.template-replace-card-actions .ant-btn {
  min-width: 0;
}

.admin-template-example-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-template-example-editor img,
.admin-template-example-editor > span {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-surface);
}

.admin-template-example-editor img {
  object-fit: cover;
}

.admin-template-example-editor > span {
  display: grid;
  color: var(--text-muted);
  font-size: 11px;
  place-items: center;
}

@media (max-width: 760px) {
  .template-replace-grid,
  .template-asset-slots {
    grid-template-columns: 1fr;
  }

  .template-replace-card-media,
  .template-replace-card-media img {
    min-height: 360px;
    height: 360px;
  }
}
