@import './colors.css.scss';

.chart-well-switch {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  table {    
    border-right: 1px solid #c5c5c5;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
    background: #fff;
  }

  th, td{
    border-left: 1px solid #c5c5c5;
    border-top: 1px solid #c5c5c5;
  }

  tr:last-child td{
    border-bottom: 1px solid #c5c5c5;
  }

  .col-header {
    text-align: center;
    height: 20px;

    &.dragged {
      background: #7DC2E6;
    }
  }

  .row-header {
    text-align: center;
    &.dragged {
      background: #7DC2E6;
    }
  }

  .well-switch {
    min-height: 60px;
    vertical-align: top;
    position: relative;

    &.selected {
      background-color: #F1F7F9;
      .ct-cq-container {
        // background-color: white;
      }
    }

    &.selected.active {
      .well-switch-container {
        // margin: -5px;
        height: calc(100% + 10px) !important;
        //height: calc(100% + 13px) !important ;
        // height: fit-content !important ;
        border: 2px solid #000;
        z-index: 999999;
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;        
        box-shadow: 0px 2px 3px rgba(0, 0, 0, .25);
        font-weight: bold;
      }
      .ct-cq-container {
        height: 58px;
        padding: 4px 20px;
      }

      .detail-container{
        height: 58px;
        padding: 4px 8px;        
      }
    }

    .well-switch-bar-container {
      background-color: #fff;
      padding: 5px;
    }

    .well-switch-bar {
      height: 5px;
      .well-target{
        width: 50%;
        height: 100%;
        display: block;        
        float: left;         
      }
      .well-hr-bar{
        position: absolute;
        height: 15px;
        width: 6px;
        background: #fff;
        left: calc(50% - 3px);
        top: 0;
        transform: rotate(30deg);
      }
    }
    
    .ct-cq-container {
      border-top: 1px solid #c5c5c5;
      padding: 2px 18px;

      min-height: 45px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: calc(100% - 20px)
    }

    .detail-container{
      border-top: 1px solid #c5c5c5;
      padding: 2px 5px;

      min-height: 45px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: calc(100% - 20px);

      .sample-name{
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        color: #000;
        font-weight: initial;
        height: 16px;
        flex: 0 0 16px;
      }

      .well-type-box{
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        img, label{
          width: 24px;
          height: 24px;
        }
        label{
          border-radius: 50%;
          margin: 0;
          padding: 0;
          border: 1px solid #c5c5c5;
        }
        .well-delimiter{
          height: 16px;
          width: 2px;
          background: #c5c5c5;
        }
      }
    }
  }
}

.small{
  .chart-well-switch {
    .well-switch {
      .detail-container {
        .sample-name {
          display: none;
        }
      }
    }
  }
}

@media (max-width: 1366px) {
  .chart-well-switch {
    .col-header {
      height: 30px;
    }

    .well-switch {
      min-height: 45px;
      .detail-container {
        min-height: 30px;
      }
    }
  }
}

@media (max-width: 1112px) {
  .chart-well-switch {
    .col-header {
      height: 20px;
    }

    .well-switch {
      min-height: 45px;
      .detail-container {
        min-height: 30px;
        padding: 5px;
      }
    }
  }
}

@media (max-width: 1024px) {
  .chart-well-switch {
    .col-header {
      height: 20px;
    }

    .well-switch {
      min-height: 45px;
      .detail-container {
        min-height: 30px;
        padding: 2px 5px;
      }
    }
  }
}
