@charset "UTF-8";

/*
 * Tsumiki part
 */

.tsumiki-parts {
  position: sticky;
  top: 0;
}

.tsumiki-part {
  cursor: move;
  border: solid 1px;
  box-sizing: border-box;
  margin-bottom: 1em;
  padding: .75rem 1rem;
  text-align: center;
  font-size: .75rem;
  position: relative;
}

.tsumiki-part::after {
  content: '';
  display: block;
  position: absolute;

  width: 0;
  height: 0;

  top: 0;
  bottom: 0;
  right: 1em;
  margin: auto;

  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent rgb(0,0,0);
}

/*
 * Tsumiki piece
 */

.tsumiki-pieces {
  position: relative;
  padding-left: 1rem;
  padding-bottom: 8rem;
}

.tsumiki-pieces::after {
  content: 'パーツをドラッグ＆ドロップしてください';
  display: block;
  position: absolute;

  left: 1rem;
  right: 0;
  bottom: 0;
  height: 8rem;

  line-height: 8rem;
  text-align: center;

  border: dashed 1px rgb(210,196,196);

  margin: auto;
}

.tsumiki-piece {
  position: relative;
  margin-bottom: 1em;
  border-style: solid;
  border-width: 1px;
  border-color: rgb(210,196,196);
}

.tsumiki-piece-form textarea {
  min-height: 6em;
  display: block;
}

.tsumiki-piece-handle {
  position: relative;
  cursor: ns-resize;
}

.tsumiki-piece-handle::before,
.tsumiki-piece-handle::after {
  content: '';
  display: block;
  position: absolute;

  width: 1px;
  height: 20px;
  background: rgb(210,196,196);

  top: 0;
  bottom: 0;
  margin: auto;
}

.tsumiki-piece-handle::before {
  right: 3px;
}
.tsumiki-piece-handle::after {
  right: 6px;
}

.tsumiki-piece-remove-btn {
  position: absolute;
  right: 3px;
  top: 3px;

  width: 1rem;
  height: 1rem;
  border: 0;
  background-color: rgb(239,110,110);
}

.tsumiki-piece-remove-btn::before,
.tsumiki-piece-remove-btn::after {
  content: '';
  display: block;
  position: absolute;

  height: 1px;
  width: 12px;

  top: 0; bottom: 0;
  left: 0; right: 0;
  margin: auto;

  background-color: rgb(255,255,255);
}
.tsumiki-piece-remove-btn::before {
  transform: rotate(45deg);
}
.tsumiki-piece-remove-btn::after {
  transform: rotate(-45deg);
}

/*
 * Droparea
 */

.tsumiki-droparea {
  width: 100%;
  height: 12rem;
  border: dashed 1px rgb(210,196,196);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  text-align: center;
  line-height: 12rem;
}

.tsumiki-droparea:not([data-value='']) {
  font-size: 0;
}

.tsumiki-droparea[data-dragging='true'][data-value=''] {
  background-color: rgb(210,196,196);
}

/*
 * Window version
 */

.tsumiki-window__frame {
  width: 100%;
  display: block;
  border: 0;
  height: 800px;
}
