@import '../index.scss';

.mod-com-videomatrix {
  width: 100%;
  height: 100%;

  &.mod-com-videomatrix-9 {
    padding: 20px 82px 12px 90px;
    border: 1px solid transparent;

    .mod-com-videomatrix-item {
      display: inline-block;
      width: calc(33.3% - 8px);
      height: calc(33.3% - 8px);
      margin-right: 8px;
      margin-bottom: 8px;
      vertical-align: top;
    }
  }

  &.mod-com-videomatrix-4 {
    padding: 20px 82px 12px 90px;
    border: 1px solid transparent;

    .mod-com-videomatrix-item {
      display: inline-block;
      width: calc(50% - 8px);
      height: calc(50% - 8px);
      margin-right: 8px;
      margin-bottom: 8px;
      vertical-align: top;
    }
  }

  &.mod-com-videomatrix-5 {

    border: 1px solid transparent;
    margin-top: 5%;
    .mod-com-videomatrix-item {
      display: inline-block;
      width: calc(48% - 8px);
      height: calc(48% - 8px);
      // margin-right: 8px;
      margin-left: 17px;
      margin-bottom: 8px;
      vertical-align: top;
    }
  }
  &.mod-com-videomatrix-1 {
    padding: 20px 90px 20px 90px;
    border: 1px solid transparent;

    .mod-com-videomatrix-item {
      display: inline-block;
      width: 100%;
      height: 100%;
      vertical-align: top;
    }
  }

  .mod-com-videomatrix-item {
    position: relative;
    background-color: rgba(0, 0, 0, 0.4);
    border: solid 1px #707070;

    &.mod-com-videomatrix-item-active {
      border: 1px solid #257962;

      .mod-com-videomatrix-header {
        background-color: #257962;
      }
    }

    .mod-com-videomatrix-header {
      display: flex;
      height: 32px;
      padding: 0 9px;
      background-color: rgba(0, 0, 0, 0.2);
      align-items: center;

      .mod-com-videomatrix-title {
        display: flex;
        flex: 1;
        width: 0;
        height: 100%;
        overflow: hidden;
        font-size: 12px;
        color: white;
        align-items: center;
        text-overflow: ellipsis;
        word-break: break-all;
        white-space: nowrap;

        img {
          margin-right: 5px;
        }
      }

      .mod-com-videomatrix-more {
        cursor: pointer;

        img {
          max-height: 32px;
          object-fit: contain;

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

    .mod-com-videomatrix-content {
      height: calc(100% - 32px);
    }

    .mod-com-hikvideo {
      width: 100%;
      height: calc(100% - 32px);

      video {
        outline: none;
        object-fit: fill;
      }
    }
  }
}


.modcom-matrixpagination {
  display: inline-flex;
  align-items: center;
  height: 100%;

  .modcom-matrixpagination-btngroup {
    display: inline-flex;
    align-items: center;
    height: 100%;
    margin-left: 20px;

    .modcom-matrixpagination-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      cursor: pointer;
      // background-color: white;
      // border: solid 1px #eaeaea;
      background-color: $background-video-btn;
      border: solid 1px $border-btn-color-eaeaea;
      border-radius: 4px 0 0 4px;

      &:hover {
        // background: #e3e3e3;
        background: $background-hover-e3e3e3;
      }

      &.modcom-matrixpagination-btn-active {
        // background: #e3e3e3;
        background: $background-video-btn-active;
      }

      & + .modcom-matrixpagination-btn {
        position: relative;
        border-left: 0;
        border-radius: 0;
      }

      img {
        max-width: 36px;
        object-fit: contain;
      }
    }

    .modcom-matrixpagination-pagenum {
      display: flex;
      align-items: center;
      height: 36px;
      padding: 0 10px;
      color: $font-color-black;
      text-align: center;
      // background-color: #e3e3e3;
      // border: solid 1px #eaeaea;
      background: $background-modcom-matrixpagination-pagenum;
      border: solid 1px $border-modcom-matrixpagination-pagenum;

      input {
        flex: 1;
        height: 100%;
        padding: 0;
        color: #345fa6;
        text-align: right;
        background: transparent;
        border: 0;
        outline: none;

        &::-webkit-outer-spin-button,
        &::-webkit-inner-spin-button {
          -webkit-appearance: none;
        }

        &[type='number'] {
          -moz-appearance: textfield;
        }
      }

      label {
        margin: 0 4px;
      }

      span {
        display: inline-block;
        flex: 1;
      }

      & + .modcom-matrixpagination-btn {
        position: relative;
        border-left: 0;
        border-radius: 0;
      }
    }

    > span {
      display: inline-flex;
      height: 100%;
      margin-left: 7px;
      font-size: 15px;
      color: $font-color-3f3f3f;
      vertical-align: top;
      align-items: center;
    }
  }
}
