/* Shared widgets components extracted from legacy global.scss. */

.faq_link{
  position: relative;
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  line-height: 14px;
  width: 14px;
  height: 14px;
  text-align: center;
  overflow: hidden;
  color: white;
  background-color: var(--balter-blue-1);
  text-decoration: none;
  border-radius: 50px;
  opacity: 0.3;
  transition: 0.3s opacity ease;
  vertical-align: middle;

  &:hover{
    opacity: 1;
  }
}

.button_addupdate{
  display: none;
}

.advertising{
  position: relative;
  padding: 10px 20px;
  background-color: white;
  border: 1px solid lightgrey;
  margin: 0 0 10px 0;
  border-radius: 4px;
  text-align: center;
  color: var(--balter-color-primary-4);
  opacity: 0.8;

  .content{

    .action_buttons{
      margin-top: 10px;
      text-align: center;
    }

  }

  &.external_data_advice{

  }

  &.is_accepted_advice{
    color: var(--balter-color-complement-2);
    background-color: var(--balter-whitegray-1);
  }

  &.need_aceptance_advice{
    color: black;
    background-color: var(--balter-whitegray-1);
    opacity: 1;
  }

  &.old{
    color: var(--balter-color-primary-1);
    background-color: var(--balter-whitegray-1);

    .button_interface{
      position: relative;
      display: inline-block;
      background-color: white;
      color: #333;
      border-radius: 4px;
      padding: 0 5px;
      cursor: pointer;
    }

  }

}

.feed_update_container{
  position: relative;
  /* background-color: white; */
  font-size: 14px;
  line-height: 20px;
  /* border: 8px solid #f7f7f7; */
  /* box-shadow: 1px 1px 6px -2px rgb(0 0 0 / 30%); */

  .subtitle{

  }

  .feed_add_element_container{
    position: relative;
    background-color: white;
    margin: 0;

    #form__update_entity_activity_from_list{
      position: relative;
      display: grid;
      grid-template-columns: 1fr;
      grid-gap: 5px;
      margin-bottom: 40px;
    }

    .field{
      margin-right: 0;
      width: 100%;
    }

    .top{

      .person_name{
        position: relative;
        font-size: 16px;
        text-align: left;
        line-height: 32px;
        padding: 0 10px;
      }

    }

    #entity_statuses_selector{
      position: relative;
      font-size: 0;
      line-height: 0;
      display: grid;
      grid-template-columns: repeat( 3, 1fr );
      grid-auto-flow: row dense;
      grid-gap: 5px;
      margin: 10px;

      .fapass{
        position: relative;
        display: block;
        text-align: center;
        line-height: 67px;
        font-size: 20px;
        background-color: #f1faff;
        margin-bottom: 5px;
      }

      .button__select_status{
        position: relative;
        cursor: pointer;
        padding: 10px;
        margin: 0 0 5px 0;
        font-size: 14px;
        line-height: 20px;
        border: 1px solid lightgrey;
        border-left: 5px solid lightgrey;
        vertical-align: top;
        transition: 0.2s all ease;

        &.full_width{
          grid-column: 1/3;
        }

        &.width_4{
          grid-column: 1/4;
        }

        &.width_3{
          grid-column: 1/3;
        }

        &[data-fval="only_comment"]{
          border-left-color: #eeeeee;
        }

        &[data-fval="new"],
        &[data-fval="published"]{
          border-left-color: #ffd6d8;
        }

        &[data-fval="contact"]{
          border-left-color: #f0c9ff;
        }

        &[data-fval="meeting"]{
          border-left-color: #fffcd6;
        }

        &[data-fval="budget"]{
          border-left-color: #d6fff9;
        }

        &[data-fval="finished"]{
          border-left-color: #eaffd6;
        }

        &[data-fval="converted"],
        &[data-fval="accepted"]{
          border-left-color: #d4ffc9;
        }

        &[data-fval="lost"],
        &[data-fval="rejected"]{
          border-left-color: #ffe8d6;
        }

        &[data-fval="evaluating_admission"]{ border-left-color: #fff0c9; }
        &[data-fval="admited"]{ border-left-color: #fbffc9; }
        &[data-fval="investigating"]{ border-left-color: #c9fff1; }
        &[data-fval="evaluating_inherim_relief"]{ border-left-color: #c9eaff; }
        &[data-fval="in_process_being_decided"]{ border-left-color: #d5c9ff; }



        &.selected{
          opacity: 1;
          cursor: default;
          border-left: 8px solid darkgreen;
          font-weight: 700;

          &[data-fval="new"],
          &[data-fval="published"]{
            background-color: #ffd6d8;
          }

          &[data-fval="contact"]{
            background-color: #f0c9ff;
          }

          &[data-fval="meeting"]{
            background-color: #fffcd6;
          }

          &[data-fval="budget"]{
            background-color: #d6fff9;
          }

          &[data-fval="converted"],
          &[data-fval="accepted"]{
            background-color: #d4ffc9;
          }

          &[data-fval="finished"]{
            background-color: #eaffd6;
          }

          &[data-fval="lost"],
          &[data-fval="rejected"]{
            background-color: #ffe8d6;
          }

          &[data-fval="evaluating_admission"]{ background-color: #fff0c9; }
          &[data-fval="admited"]{ background-color: #fbffc9; }
          &[data-fval="investigating"]{ background-color: #c9fff1; }
          &[data-fval="evaluating_inherim_relief"]{ background-color: #c9eaff; }
          &[data-fval="in_process_being_decided"]{ background-color: #d5c9ff; }

        }

        &:hover{

        }

      }

    }

    .status{
      position: relative;
      line-height: 30px;
      padding: 0 10px;
      font-size: 18px;
      background-color: var(--balter-whitegray-1);
      border-top: 2px solid lightgrey;
      margin: 10px;

    }

    #entity_status_details{
      position: relative;

      .status_details{
        position: relative;
        display: none;

        &.active{
          display: block;
        }
      }

    }


    .bottom{
      position: relative;
      width: 100%;
    }
  }

}

#widget_sage_sync_requester{
  box-sizing: border-box;
  width: 100%;
  padding: 10px 20px;
  margin-bottom: 10px;

  table{
    position: relative;
    width: 100%;
    border: 0;
    box-sizing: border-box;

    tr{
      border: 0;
      td{
        border: 0;
        line-height: 16px;
        font-size: 14px;

      }
    }

    .left{
      text-align: left;
    }

    .right{
      text-align: right;
    }

  }

  .last_sage_update{
    position: relative;
    display: inline-block;
    font-size: 14px;
    line-height: 18px;
    vertical-align: top;

    @media only screen and (max-width: 600px){
      font-size: 14px;
    }
  }

  .sync_status_added{

  }

  .button__create_sync_ticket{
    position: relative;
    box-sizing: border-box;
    display: inline-block;
    padding: 0;
    /* margin: 10px; */
    border: 1px solid var(--balter-primary-color);
    border-left: 2px solid var(--balter-primary-color);
    background-color: var(--balter-background-1);
    color: var(--balter-primary-color);
    transition: 0.2s all ease;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    vertical-align: top;

    img{
      position: relative;
      display: inline-block;
      color: #333;
      font-size: 16px;
      line-height: 18px;
      width: 18px;
      text-align: center;
      margin: 1px 0;
      vertical-align: top;
      background-color: white;
      padding: 4px;
      border-radius: 0 4px 4px 0;
      overflow: hidden;

      @media only screen and (max-width: 600px){
        font-size: 14px;
      }
    }

    .text{
      position: relative;
      display: inline-block;
      margin: 4px 10px;
      font-size: 16px;
      line-height: 20px;
      min-width: 40px;
      vertical-align: top;
      text-align: center;

      @media only screen and (max-width: 600px){
        font-size: 14px;
      }
    }

    &:hover{
      /* background-color: var(--balter-color-primary-3); */
      background-color: var(--balter-background-2);
      color: #E36B7C;
    }

    &.hidded{
      display: none !important;
    }
  }

}

.module_offer_area{
  position: relative;
  border: 1px solid lightgrey;
  border-left: 2px solid #589a52;
  margin: 10px 10px 0 10px;

  .small_values_table{
    position: relative;
    margin: 20px auto 0 auto;
    box-sizing: border-box;
    width: 80%;

    tr{
      th,
      td{
        padding: 3px 5px;
        font-size: 16px;
        line-height: 30px;
      }
    }

  }

  .select_module_contract_area{
    position: relative;
    box-sizing: border-box;
    /* margin: 20px auto 20px auto; */
    /* width: 80%; */

    margin: 5px 10px 0 0;
    /* background-color: #ebfffe; */
    padding: 10px;
    border-left: 2px solid #589a52;

    .riswitcher{
      background-color: white;
    }

  }

}

/* -----BLOCK ACTIVITY FEED---------------------------------------------------------------------------------------------- */

.block__activity_feed{
  position: relative;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 20px;
  padding: 0 20px;

  .entity_creator{
    position: relative;

    img{
      position: relative;
      display: inline-block;
      height: 40px;
      border-radius: 50%;
      vertical-align: top;
      border: 1px solid var(--balter-primary-color);
    }

    .alias{
      position: relative;
      display: inline-block;
      line-height: 20px;
      margin-top: 15px;
      vertical-align: top;
      font-weight: 700;
    }

    .registered_shortinfo{
      position: relative;
      display: inline-block;
      line-height: 20px;
      margin-top: 10px;
      vertical-align: top;
    }

  }

  .creator_description{
    position: relative;
    display: inline-block;
    clear: right;
    padding: 0 10px 10px 20px;
    border-left: 3px solid var(--balter-primary-color);
    margin-left: 20px;

    p{
      margin: 0;
    }

  }

  .activity_feed_data{

    .feed_container{
      position: relative;
      background-color: white;
      font-size: 14px;
      line-height: 20px;

      .feed_content{
        position: relative;

        .feed_element{
          position: relative;
          display: block;
          clear: right;
          padding: 20px 0 0 0;
          border-left: 2px solid var(--balter-primary-color);
          border-radius: 0 5px 5px 0;
          overflow: hidden;
          margin: 0 50px 0 0;

          .top{
            position: relative;
            background-color: #fbfbfb;
            /* margin-top: 10px; */
            /* height: 30px; */
            /* border-left: 2px solid #d5d5d5; */
            /* border-radius: 0 10px 10px 0; */
            border: 1px solid #d5d5d5;
            border-left-width: 0;
            border-bottom-width: 0;
            border-radius: 0 5px 0 0;

            .feed_counter{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: left;
              line-height: 20px;
              padding: 5px 0;
              text-align: center;
              min-width: 20px;
            }

            .entity_icon{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: left;
              height: 20px;
              width: 20px;
              margin: 5px;

              img{
                position: relative;
                width: 100%;
              }

            }

            .datetime{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: right;
              box-sizing: border-box;
              height: 30px;
              line-height: 20px;
              padding: 5px;
              font-size: 12px;
              text-align: left;
              text-transform: uppercase;
              border-left: 1px solid #d5d5d5;
            }

            .status{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: left;
              box-sizing: border-box;
              line-height: 20px;
              padding: 5px 10px;
              font-size: 16px;
              /* background-color: var(--balter-whitegray-1); */
              /* border-top: 1px solid lightgrey; */
              /* margin: 10px; */
              /* white-space: nowrap; */
              border-left: 1px solid #d5d5d5;
              background-color: #fbfbfb;
              font-weight: 600;

              &.new,
              &.published{
                background-color: #ffd6d8;
                background: linear-gradient(0deg, rgba(0,0,0,0) 0%, #ffd6d8 30%, #ffd6d8 100%);
              }

              &.contact{
                background-color: #d6fff9;
                background: linear-gradient(0deg, rgba(0,0,0,0) 0%, #d6fff9 30%, #d6fff9 100%);
              }

              &.meeting{
                background-color: #fffcd6;
                background: linear-gradient(0deg, rgba(0,0,0,0) 0%, #fffcd6 30%, #fffcd6 100%);
              }

              &.budget{
                background-color: #d6ffd9;
                background: linear-gradient(0deg, rgba(0,0,0,0) 0%, #d6ffd9 30%, #d6ffd9 100%);
              }

              &.converted{
                background-color: #d4ffc9;
                background: linear-gradient(0deg, rgba(0,0,0,0) 0%, #d4ffc9 30%, #d4ffc9 100%);
              }

              &.lost{
                background-color: #ffe8d6;
                background: linear-gradient(0deg, rgba(0,0,0,0) 0%, #ffe8d6 30%, #ffe8d6 100%);
              }
            }

            .avatar{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: right;
              box-sizing: border-box;
              height: 30px;
              margin: 0 0 0 5px;
              /* border: 1px solid #A52133; */
              border-radius: 3px;
            }

            .person_name{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: right;
              box-sizing: border-box;
              font-size: 14px;
              height: 30px;
              line-height: 20px;
              padding: 5px;
              text-align: left;

            }


            /*&:before {
              content:"\A";
              border-style: solid;
              border-width: 10px 15px 10px 0;
              border-color: transparent #d5d5d5 transparent transparent;
              position: absolute;
              top: 20px;
              left: 5px;
            }*/

            .formbutton_delete_container{
              position: relative;
              display: inline-block;
              vertical-align: top;
              float: left;

              i{
                margin: 3px 0;
              }

              .button_delete{
                border: 0;
                background-color: white;
                margin-top: 1px;

                .text{
                  display: none;
                }

              }
            }

          }

          .bottom{
            position: relative;
            box-sizing: border-box;
            width: 100%;
            padding: 0 0 0 0;
            /* border-bottom: 1px solid #d5d5d5; */
            border: 1px solid #d5d5d5;
            border-left-width: 0;
            border-top-width: 0;
            border-radius: 0 0 5px 0;
            overflow: hidden;

            .comment{
              position: relative;
              box-sizing: border-box;
              /* margin: 10px; */
              /* max-height: 350px; */
              /* overflow: auto; */
              /* border: 1px solid #e7e7e7; */
              background-color: white;
              padding: 2px 10px;
              /* margin: 0 10px 10px 0; */
              min-width: 400px;

              p{
                margin: 0;
                line-height: inherit;
              }

              img{
                max-width: 100%;
              }

              .miniblock_of_content{
                margin: 5px 10px;
                background-color: #fcfcfc;
                padding: 5px 10px;
                border: 1px solid #f3f3f3;
                border-radius: 5px;
              }

            }

            .pdf_preview{
              position: relative;
              width: 100%;

              iframe{
                height: 800px;
              }
            }

            .recipients_for_activity{
              position: relative;
              box-sizing: border-box;
              overflow: auto;
              background-color: white;
              padding: 2px 10px;
              min-width: 400px;
              border-left: 2px solid #d5d5d5;

            }

          }

          &:nth-child(1){
            margin-right: 0;
          }

          &:nth-child(2){
            margin-right: 5px;
          }

          &:nth-child(3){
            margin-right: 10px;
          }

          &:nth-child(4){
            margin-right: 15px;
          }

          &:nth-child(5){
            margin-right: 20px;
          }

          &:nth-child(6){
            margin-right: 25px;
          }

          &:nth-child(7){
            margin-right: 30px;
          }

          &:nth-child(8){
            margin-right: 35px;
          }

          &:nth-child(9){
            margin-right: 40px;
          }

          &:nth-child(10){
            margin-right: 45px;
          }

        }

      }

    }

    .button_container{
      position: relative;
      display: block;
      text-align: right;

      .button__ajax_popup{
        margin-top: 10px;
      }

    }

  }

  &.hidded{
    display: none !important;
  }

}

/* -----END POPUP-------------------------------------------------------------------------------------------------------- */
/* -----GLOBAL WIDGET---------------------------------------------------------------------------------------------------- */

.gloabl_widget{
  position: relative;
  display: block;
  background-color: white;
  /* width: calc( 100% - 5px ); */
  font-size: 14px;
  line-height: 18px;
  padding: 0;
  box-sizing: border-box;
  vertical-align: top;
  /* box-shadow: 1px 1px 6px -2px rgba(0,0,0,.3); */

  .title{
    position: relative;
    font-size: 18px;
    line-height: 22px;
    font-weight: 600;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 0;
    text-align: left;
    border-left: 5px solid #e7e7e7;

    /*&:first-letter{
      color: #A52133;
    }*/

    @media only screen and (max-width: 600px){
      font-size: 16px;
      line-height: 16px;
      padding: 5px 10px;
    }

  }

  .content{
    position: relative;
    padding: 0 10px 10px 10px;
    border-radius: 0 0 3px 3px;

    @media only screen and (max-width: 600px){
      padding: 0 5px 5px 5px;
    }

    .chart_container{
      position: relative;
      width: 80%;
      margin: 0 auto;
    }

    table{
      width: 100%;

      tr{
        border: 1px solid #efefef;
      }

      td{
        border: 1px solid #efefef;
        padding: 0 5px;
      }
    }

    .sage_connection_error{
      font-size: 20px;
      line-height: 30px;
      color: red;
    }

  }

}

/* -----COMPLAINT RELATED------------------------------------------------------------------------------------------------ */

.activity_feed_complaint{
  .entity_creator{
    img{
      border-top: 0;
      border-left: 0;
      border-right: 0;
      /* border-radius: 0; */
      padding: 2px;
      height: 36px;
    }
  }

  .top{
    .avatar{
      padding: 2px;
    }
  }
}
