@import 'marc-record-panel-colors';

.subrecord-merge-panel {

  table-layout: fixed;

  .marc-record {
    @include marc-colors();
  }

  thead {
    tr {
      td {
        padding: 0px 5px;
        font-size: small;
        color: #9e9e9e;
      }
    }
  }

  tr:not(.is-compacted) {
    .empty-droppable {
      height: 110px;
      border: 2px dashed #CCC;
      border-radius: 5px;

      &.can-drop {
        border-color: #c8e6c9;
        &.is-over {
          border-color: #66bb6a;
        }
      }

      &.cannot-drop {
        &.is-over {
          border-color: #ef5350;
        }
      }
    }
  }
  
  .to-remove-source td:nth-child(1) {
    background-image: url("../../images/to-remove-start.svg");
  }
  .to-remove-source td:nth-child(2) {
    background-image: url("../../images/to-remove.svg");
  }
  .to-remove-source td:nth-child(3),
  .to-remove-target td:nth-child(3) {
    background-image: url("../../images/to-remove-end.svg");
  }

  .to-result td:nth-child(1) {
    background-image: url("../../images/to-merged-start.svg");
  }
  .to-result td:nth-child(2) {
    background-image: url("../../images/to-merged.svg");
  }

  .to-merge td:nth-child(1) {
    background-image: url("../../images/line-start-green.svg");
  }
  .to-merge td:nth-child(2) {
    background-image: url("../../images/line-middle-green.svg");
  }

  td {
    position: relative;
    transition: background-image 0.2s ease-in-out;
  }

  .merge-action-button {
    position: absolute; 
    top: calc(50% - 22px);
    left: -18px;
  }

  .remove-fab-emptyrow {
    position: absolute; 
    top:10px;
    right: 10px;

    opacity: 0.2;
    &:hover {
      opacity: 0.8;
    }
  }

  .add-new-row {
    margin-top: -8px;
    height: 16px;
    display: block;
    position: absolute;
    width: 100%;
    border: 0;
    transition: background-color 150ms ease-in;
    transition-delay: 0ms;
    z-index: 1;
    &:hover:not(.disabled) {
      transition-delay: 300ms;
      cursor: pointer;
      background-color: rgba(200,230,201,0.5);
    }
  }

  .add-new-row td {
    padding: 0;
  }

  td {
    position: relative;
  }

  .subrecord-row-swap-button-container, .subrecord-action-button-container {
      
    position: absolute; 
    top: 50%;
    transform: translateY(-50%);
    left: -18px;
    padding-bottom: 2px;
    height: 0px;
    display: flex;
    align-items: center;
    z-index: 1;

    &.fixed-action-btn > ul.open-left {
      bottom: auto;
      height: auto;
      position: relative;
      right: auto;
      text-align: left;
      top: initial;
      transform: initial;
    }
    &.fixed-action-btn.horizontal {
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: left;
    }

    ul.open-left > li {
      margin: 0px 10px 0 0;
    }

    .subrecord-row-swap-button, .subrecord-action-button {
      margin: 0px 10px 0 0;
    }

  }
  .subrecord-row-swap-button.active {
    transform: rotate(0.5turn); 
  }
}
