@import "../../../assets/scss/variables";
:root {
  --secondary-to-gray:#1A73E8;
  --svg:brightness(0) saturate(100%) invert(10%) sepia(45%) saturate(6417%) hue-rotate(244deg) brightness(72%) contrast(125%);
  --hover-has-file:#040059;
  --has-file-bg:#f8f8f8;
  --has-file-border:#040059;
  --is-locked-border:$inactive-text;
}
:root[data-theme="dark"] {
  --secondary-to-gray:#CCCCCC;
  --svg: brightness(0) saturate(100%) invert(58%) sepia(84%) saturate(0%) hue-rotate(152deg) brightness(111%) contrast(113%);
  --hover-has-file:#0055AB;
  --has-file-bg:#20262E;
  --has-file-border:#20262E;
  --is-locked-border:#20262E;
}
$is-locked-border:var(--is-locked-border);
$secondary-to-gray:var(--secondary-to-gray);
$svg:var(--svg);
$hover-has-file:var(--hover-has-file);
$has-file-bg:var(--has-file-bg);
$has-file-border:var(--has-file-border);

.file-upload-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.deltio-box {
  width: 100%;
  height: 140px;
  border: 1px dashed $secondary-to-gray;
  border-radius: 4px;
  position: relative;
overflow: hidden;

  input[type=file] {

    color: transparent;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 1;
    cursor: pointer;

    &::file-selector-button {
      width: 0px;
      height: 0px;
      visibility: hidden;
    }


  }

  .inner-deltio {
    border-radius: inherit;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    //transform: translate(-50%, -50%);

    .content {
      padding: 15px 20px;
      height: 100%;
      background: $app-background;
      text-align: center;
      pointer-events: none;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      gap: 10px;

      .year-month {
        font-weight: bold;
        font-size: 1.4rem;
        color: $title-color;
        white-space: pre-line;
      }

      .updated-by {
        font-size: 1.2rem;
        color: $title-color;
        font-weight: normal;
      }

      img.add {
        display: block;
        width: 38px;
        height: 38px;
        border: 2px solid $title-color;
        border-radius: 50%;
        padding: 6px;
        filter: $svg;
      }
    }

    .hoverable {
      display: none;
    }

  }

  &.hasDeltio {
    border: 1px solid $has-file-border;
    //background: #F8F8F8;


    &:hover {
      cursor: pointer;
      background: $hover-has-file;
      border: 1px solid $hover-has-file;

      .inner-deltio {



        .content {
          display: none !important;
        }

        .hoverable {
          display: flex;
          height: 100%;
          width: 100%;
          color: $white;
          font-size: 1.2rem;
          font-weight: bold;
          justify-content: space-evenly;
          align-items: center;

          > div {
            flex: 1;
            height: 60px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            position: relative;

            &:not(:last-child):after {
              position: absolute;
              content: '';
              height: 50px;
              width: 1px;
              border-right: 1px dashed white;
              top: 0;
              right: 0;
            }
          }

          img {
            display: inline-block;
            width: 23px;
            filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(14%) hue-rotate(57deg) brightness(105%) contrast(103%);
          }

          span {

          }
        }
      }


    }
  }

  &.isLocked {
    background: $grayish-box-background;
    border-color: $is-locked-border;

    & .content {
      background: $grayish-box-background;
    }
  }
}

/***STYLES FOR INNER VIEWS WHEN FILE IS UPLOADED*/

.deltio-box {

  .uploaded{
    display: contents;
  }

  .deltio-view {
    height: 100%;
    width: 100%;
    background: $has-file-bg;
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    align-items: flex-start;
    justify-content: flex-end;

    img{
      margin-bottom: 10px;
    }

    p{
      color: $title-color;
      font-size: 1.4rem;
      font-weight: bold;
    }

    .updated-by{
      font-weight: normal;
      font-size: 1.2rem;
      margin-top: 7px;
    }

  }

  .file-view{
    height: 100%;
    gap: 30px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    img{
      width: 30px;
      filter: brightness(0) saturate(100%) invert(68%) sepia(85%) saturate(6313%) hue-rotate(201deg) brightness(90%) contrast(103%);
    }
    p{
      font-size: 1.6rem;
      font-weight: bold;
      color: $title-color;
    }
  }
}

