@import '../../../styles/common.scss';

.container {
  width: 100%;

  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;

  background-color: var(
    --dynamic-list-entry-row-bg-color,
    $dynamic-list-entry-row-bg-color
  ) !important;

  border-bottom: var(
    --dynamic-list-row-border,
    $dynamic-list-row-border
  ) !important;

  box-sizing: border-box;

  z-index: 1;

  column-gap: var(--dynamic-list-column-gap, $dynamic-list-column-gap);

  padding: 1px 0px 1px 0px;

  > .column:first-child {
    padding-left: var(--dynamic-list-column-gap, $dynamic-list-column-gap);
  }

  .column {
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;

    align-items: inherit;

    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;

    padding: 2px;
  }

  .position,
  .actionButton {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
  }

  .actionButton svg {
    height: 60%;
  }

  .position {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr 1fr;

    justify-items: start;
    align-items: center;

    svg {
      stroke: var(--input-disabled-border-color, $input-disabled-border-color);
      rect {
        fill: var(--input-disabled-border-color, $input-disabled-border-color);
      }
    }

    input {
      all: unset; // remove all input styling
      height: 50px;
      width: 50px;

      box-sizing: border-box;

      padding: 4px;
      border: 1px solid var(--input-border-color, $input-border-color);

      &:disabled {
        color: var(--input-disabled-font-color, $input-disabled-font-color);

        border-color: var(
          --input-disabled-border-color,
          $input-disabled-border-color
        );
      }
    }

    /* remove arrows from input
     Chrome, Safari, Edge, Opera */
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    /* remove arrows from input
     Firefox */
    input[type='number'] {
      -moz-appearance: textfield;
    }

    .draggable {
      height: 100%;
      width: 100%;

      display: grid;
      grid-template-rows: 1fr;
      grid-template-columns: 1fr;
      place-items: center;
    }

    .input {
      display: grid;
      grid-template-rows: 1fr;
      grid-template-columns: 1fr;

      text-align: center;
    }
  }

  .actionButtonContainer {
    display: grid;
    height: 100%;
    padding: 2px 0;

    .actionButton {
      height: 50px;
      width: 50px;
      justify-self: end;
    }
  }

  .dragIcon {
    height: 40px;

    rect {
      width: 5.5px;
      height: 5.5px;
    }
  }
}
