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

.select2-selection--multiple{

  .select2-selection__choice{

    .select2-selection__choice__remove{
      position: absolute;
      top: calc(50% - 10px);
      right: 0;
      width: 20px;
      height: 20px;
      line-height: 20px;
      text-align: center;
      font-size: 20px;
    }

    .select2_option__member{
      grid-template-columns: 20px 1fr;

      .avatar{
        width: 20px;
      }

      .text{
        line-height: 20px;
      }

    }

  }

}

.select2-dropdown{
  min-width: 250px;

  .select2-results__options{
    max-height: 400px !important;

    .select2-results__option{
      max-height: none !important;
      font-size: 15px;
      line-height: 12px;

      .select2-results__options{
        max-height: none !important;
      }

    }

  }

  .perselector_person{
    position: relative;
    /* display: grid; */
    /* grid-template-columns: 30px 1fr; */
    /* grid-auto-flow: row dense; */
    /* grid-gap: 2px; */
    /* margin: 2px; */

    /* .avatar{ */
    /* position: relative; */
    /* width: 30px; */
    /* grid-column: 1; */
    /* grid-row: 1/3; */
    /* } */

    /* .text{ */
    /* grid-column: 2; */
    /* grid-row: 1; */
    /* } */

    /* .extra{ */
    /* grid-column: 2; */
    /* grid-row: 2; */
    /* } */

  }

}

.phones_list_complex{
  line-height: 20px;

  .phone_area{
    position: relative;
    /* display: inline-block; */
    display: block;
    vertical-align: top;
    background-color: rgba(27, 255, 0, 0.05);
    padding: 2px;
    border-radius: 3px;
    margin: 1px;
    border: 1px solid #e9e9e9;
    white-space: nowrap;
    max-width: 100%;

    .button_tlf,
    .button_whatsapp,
    .button_telegram{
      position: relative;
      width: 20px;
      height: 14px;
      padding: 3px;
      background-color: white;
      border-radius: 3px;
      vertical-align: top;
    }

    .phonetext{
      position: relative;
      display: inline-block;
      max-width: calc(100% - 30px);
      overflow: hidden;
      vertical-align: top;
      user-select: all;
      font-size: 14px;
      /* word-break: break-word; */
    }

    .phonedetails{
      position: relative;
      vertical-align: top;
      display: block;
      font-size: 80%;
      line-height: 90%;
      text-align: right;
    }
  }

  &.inline{
    /* display: inline-block; */
    vertical-align: top;

  }

}

table{
  tr{
    td{
      .phones_list_complex{
        .phone_area{
          display: inline-block;
        }

      }
    }
  }
}

.niftext{
  user-select: all;
}

.emails_list_complex{
  line-height: 20px;

  .email_area{
    position: relative;
    /* display: inline-block; */
    display: block;
    vertical-align: top;
    background-color: rgba(255, 201, 0, 0.05);
    padding: 2px;
    border-radius: 3px;
    margin: 1px;
    border: 1px solid #e9e9e9;
    white-space: nowrap;
    max-width: 100%;

    .button_mailto{
      position: relative;
      width: 20px;
      height: 14px;
      padding: 3px;
      background-color: white;
      border-radius: 3px;
      vertical-align: top;
    }

    .mailtext{
      position: relative;
      display: inline-block;
      max-width: calc(100% - 30px);
      overflow: hidden;
      vertical-align: top;
      user-select: all;
      font-size: 14px;
      /* word-break: break-word; */
    }

    .emaildetails{
      position: relative;
      vertical-align: top;
      display: block;
      font-size: 80%;
      line-height: 90%;
      text-align: right;
    }

  }


  &.inline{
    /* display: inline-block; */
    vertical-align: top;

  }

}

table{
  tr{
    td{
      .emails_list_complex{
        .email_area{
          display: inline-block;
        }

      }
    }
  }
}

.problems_list{
  position: relative;
  margin: 25px auto 5px auto;
  width: 100%;
  max-width: 1400px;
  right: auto;

  /* position: fixed; */
  /* padding: 3px 5px; */
  /* margin: 0; */
  /* width: calc( (-1360px + 100vw) / 2); */
  /* right: 32px; */
  background-color: white;
  border: 1px solid lightgrey;
  box-sizing: border-box;


  /*@media only screen and (max-width: 1800px){
    position: relative;
    margin: 25px 0 5px 0;
    width: 100%;
    right: auto;
  }*/

  .problems_list_title{
    position: absolute;
    right: 20px;
    top: -20px;
    background-color: white;
    display: inline-block;
    font-size: 16px;
    line-height: 20px;
    height: 20px;
    padding: 0 10px;
    border: 1px solid lightgrey;
    border-bottom: 0;
    box-sizing: border-box;
  }

  .problem{
    position: relative;
    background-color: white;
    border: 1px solid lightgrey;
    padding: 3px 10px;
    margin: 2px 0;
    font-size: 16px;
    line-height: 20px;

    &.problem_level_medium{
      border: 1px solid orange;

      strong{
        text-shadow: -1px 0px 1px rgba(0, 0, 0, 0.4);
        color: orange;
      }
    }

    &.problem_level_high{
      border: 1px solid orangered;

      strong{
        text-shadow: -1px 0px 1px rgba(0, 0, 0, 0.4);
        color: orangered;
      }
    }

    &.problem_level_low{
      border: 1px solid green;

      strong{
        text-shadow: -1px 0px 1px rgba(0, 0, 0, 0.4);
        color: green;
      }
    }

    &.hidded{
      display: none;
    }

    .into_title_block_container{
      position: relative;
      margin: 6px 0;
      padding: 12px 14px;
      box-sizing: border-box;
      border: 1px solid #A52133;
      border-left: 5px solid #A52133;
      background: #fff8f8;
      color: #2C2C2C;
      font-size: 13px;
      line-height: 1.35;

      .primary_title{
        position: relative;
        margin: 0 0 7px 0;
        font-size: 15px;
        font-weight: 700;
        color: #A52133;
      }

      .resume{
        position: relative;
        margin: 3px 0;
        color: #2C2C2C;

        .label{
          font-weight: 600;
        }

        .value{
          font-weight: 500;
        }
      }

      .details{
        position: relative;
        margin: 8px 0;
        padding: 8px 10px;
        box-sizing: border-box;
        background: #ffffff;
        border: 1px solid rgba(165, 33, 51, 0.25);

        .label{
          font-weight: 700;
          color: #A52133;
        }

        .error_code{
          display: inline-block;
          margin: 0 4px;
          padding: 1px 5px;
          border-radius: 3px;
          background: #A52133;
          color: #ffffff;
          font-weight: 700;
          font-size: 12px;
        }

        .error_description{
          font-weight: 500;
        }
      }

      .recomendations_title{
        position: relative;
        margin: 9px 0 5px 0;
        font-weight: 700;
        color: #A52133;
      }

      .recomendations_content{
        position: relative;
        padding: 8px 10px;
        box-sizing: border-box;
        background: #ffffff;
        border: 1px solid #eeeeee;

        .recommendation_line{
          position: relative;
          display: flex;
          align-items: flex-start;
          gap: 6px;
          margin: 0 0 5px 0;

          .recommendation_number{
            flex: 0 0 auto;
            font-weight: 700;
            color: #A52133;
          }

          .recommendation_text{
            flex: 1 1 auto;
          }

          a{
            color: #A52133;
            font-weight: 700;
            text-decoration: none;

            &:hover{
              text-decoration: underline;
            }
          }
        }

        .verifactu_retry_button_container{
          position: relative;
          margin: 8px 0 0 0;

          form,
          .formbutton,
          button{
            display: inline-flex;
            align-items: center;
          }
        }
      }

      .legal_advice_for_ignorance{
        position: relative;
        margin: 10px 0 0 0;
        padding: 9px 10px;
        box-sizing: border-box;
        background: #fff6df;
        border: 1px solid #f0c36d;
        color: #5c4300;

        .legal_advice_title{
          position: relative;
          margin: 0 0 4px 0;
          font-weight: 700;
          color: #8a5a00;
        }

        .legal_advice_content{
          position: relative;
          font-size: 12.5px;
          line-height: 1.35;
        }
      }
    }

  }

}

.block__members_selector_container{
  position: fixed;
  z-index: 401;
  bottom: 30px;
  right: 0;
  max-width: 0;
  height: calc( 100vh - 65px);
  width: calc( 100vw - 260px );
  background-color: transparent;
  transition: 0.5s background-color ease;

  .block__members_selector{
    position: absolute;
    z-index: 402;
    right: -300px;
    bottom: 0;
    height: calc( 100vh - 65px);
    width: 300px;
    background-color: white;
    box-sizing: border-box;
    border: 1px solid lightgrey;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5px;
    box-shadow: 2px 2px 3px 0 rgba(0,0,0,0.75);
    transition: 0.5s all ease;

    .button__close{
      position: relative;
      display: block;
      width: 40px;
      margin: 0 15px 0 auto;
      font-size: 14px;
      line-height: 16px;
      cursor: pointer;
      background-color: var(--balter-primary-color);
      color: white;
      text-align: center;
      border-radius: 3px;
      opacity: 0.6;
      transition: 0.2s opacity ease;

      &:hover{
        opacity: 1;
      }
    }

    .departament_name{
      font-size: 18px;
      line-height: 18px;
    }

    .departament_members{ /* hay casos cuando no existe pero existe .member */
      border: 1px solid lightgrey;
      padding: 0 5px;
      margin-bottom: 10px;
    }

    .member{
      position: relative;
      box-sizing: border-box;
      margin: 5px 0;
      background-color: #f5f5f5;
      cursor: pointer;
      padding: 0;

      .left{
        position: relative;
        box-sizing: border-box;
        float: left;
        width: 40px;

        img{
          position: relative;
          width: 100%;
          display: block;
        }
      }

      .right{
        position: relative;
        box-sizing: border-box;
        float: left;
        width: calc( 100% - 40px );
        padding: 5px;
        font-size: 14px;
        line-height: 15px;
      }

      &.ex_member{
        display: none;
      }

      &[data-active="yes"]{
        display: block;
        background-color: lightseagreen;
        color: white;
      }

      &[data-active="no"]{

      }

    }

  }

  &.active{
    display: block;
    max-width: calc( 100vw - 260px );
    right: 0;
    background-color: rgba(0, 0, 0, 0.4);

    .block__members_selector{
      right: 0;
    }
  }

}

.members_list{
  position: relative;

  .member{
    position: relative;
    display: inline-block;
    font-size: 0;
    line-height: 0;
    height: 20px;
    /* border-radius: 4px; */
    overflow: hidden;
    margin: 2px;
    white-space: nowrap;

    .avatar{
      position: relative;
      display: inline-block;
      width: 20px;
      height: 20px;
      margin: 0 auto;
      border-radius: 50%;

      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;

      vertical-align: top;

    }

    .alias{
      position: relative;
      display: inline-block;
      height: 20px;
      font-size: 12px;
      line-height: 20px;
      vertical-align: top;

    }
  }

}

.block__members_list{
  cursor: pointer;
  position: relative;
  background-color: transparent;
  transition: 0.2s all ease;
  min-width: 100px;
  min-height: 54px;
  box-sizing: border-box;
  line-height: 0;
  font-size: 0;

  .indicator__open{
    position: absolute;
    z-index: 2;
    display: block;
    right: 5px;
    top: 5px;
    width: 20px;
    opacity: 0.2;
    transition: 0.3s opacity ease;
  }

  .member{
    position: relative;
    display: inline-block;
    font-size: 0;
    line-height: 0;
    background-color: lightgrey;
    /* border-radius: 4px; */
    overflow: hidden;
    padding: 2px;
    margin: 2px;
    width: 40px;
    white-space: nowrap;

    .avatar{
      position: relative;
      display: block;
      height: 50px;
      width: 100%;
      /* min-width: 60px; */
      margin: 0 auto;

      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;

    }

    .alias{
      position: relative;
      display: block;
      height: 14px;
      font-size: 12px;
      line-height: 14px;
      margin: -14px auto 0 auto;
      background: linear-gradient(0deg, #D3D3D3FF 0%, #D3D3D3FF 50%, rgba(211, 211, 211, 0) 100%);
      text-align: center;
      text-shadow: 0px -1px 0px #FFF;
      color: var(--balter-primary-color);

    }
  }

  &:hover{
    .indicator__open{
      opacity: 0.6;
    }
  }

  &.format_2{
    min-height: 24px;
    border-radius: 2px;
    min-width: 60px;
    max-width: none;
    padding-right: 30px;

    .indicator__open{
      position: absolute;
      display: block;
      right: 5px;
      left: auto;
      top: 5px;
      width: 20px;
      opacity: 0.2;
      transition: 0.2s opacity ease;
    }

    .member{
      position: relative;
      display: inline-block;
      vertical-align: top;
      font-size: 0;
      line-height: 0;
      background-color: transparent;
      border-radius: 2px;
      overflow: hidden;
      padding: 0;
      margin: 2px;
      width: auto;

      .avatar{
        position: relative;
        display: inline-block;
        vertical-align: top;
        width: 26px;
        height: 26px;
      }

      .alias{
        position: relative;
        display: inline-block;
        vertical-align: top;
        height: 26px;
        font-size: 14px;
        line-height: 26px;
        padding: 0 5px;
        margin: 0;
        background: white;
      }
    }

    &:hover{
      background-color: transparent;

      .indicator__open{
        opacity: 0.4;
      }

    }
  }

  &.format_3{
    min-height: 24px;
    border-radius: 2px;
    min-width: 60px;
    max-width: none;

    .indicator__open{
      position: absolute;
      display: block;
      left: 2px;
      top: 2px;
      width: 20px;
      opacity: 0.2;
    }

    .member{
      position: relative;
      display: inline-block;
      vertical-align: top;
      font-size: 0;
      line-height: 0;
      background-color: transparent;
      border-radius: 2px;
      overflow: hidden;
      padding: 0;
      margin: 2px;
      width: auto;

      .avatar{
        position: relative;
        display: inline-block;
        vertical-align: top;
        width: 20px;
        height: 20px;
      }

      .alias{
        position: relative;
        display: inline-block;
        vertical-align: top;
        height: 20px;
        font-size: 14px;
        line-height: 20px;
        padding: 0 5px;
        margin: 0;
        background: white;
      }
    }
  }

}

.simplified_invoice_name_in_list{
  position: relative;
  display: inline-block;
  margin: 0 5px 0 5px;
  font-size: 16px;
  line-height: 36px;
  min-width: 40px;
  vertical-align: top;
  text-align: left;
}

.nif_state_information{
  position: relative;
  font-size: 12px;
  line-height: 12px;
  padding: 2px 0 5px 0;

  .nif_state_information_content{
    padding: 5px;
    border: 1px solid #e3e3e3;

  }

  &.active{
    display: block;
  }

  .value{
    font-weight: 600;
  }

  .nif_error{
    .value{
      font-weight: 700;
      color: var(--balter-primary-color);
    }
  }

  .nif_warning{
    .value{
      font-weight: 700;
      color: var(--balter-color-secondary-1-0);
    }
  }

  .nif_type,
  .nif_organization,
  .nif_details,
  .nif_location{
    .value{
      font-weight: 700;
    }
  }

  .button__get_person_data_from_sage_despachos{
    white-space: break-spaces;

    .tiny_text{
      position: relative;
      display: block;
      text-align: center;
      font-size: 14px;
      line-height: 16px;
    }

  }
}

.group_birth_data,
.group_life_details{
  &.hidded{
    display: none;
  }
}

.row{
  position: relative;
  vertical-align: top;
  padding: 5px 20px;
  box-sizing: border-box;
  max-width: 100%;

  .icon{ display: none; }
  &.iconed{
    padding-left: 30px !important;

    .icon{
      position: absolute;
      display: block;
      left: 2px;
      top: 11px;
      width: 26px;
    }

  }

  &.full{
    width: 100%;
  }

  .row_title{
    position: relative;
    font-size: 16px;
    line-height: 16px;
    margin-top: 5px;
    font-weight: 600;

    /*&:first-letter{
      color: #A52133;
    }*/

  }

  .row_description{
    position: relative;
    font-size: 14px;
    line-height: 16px;
    min-height: 16px;
    font-style: italic;

  }

  .row_value{
    position: relative;
    font-size: 16px;
    line-height: 16px;
    min-height: 20px;
    padding: 2px 0;
    /* font-weight: 600; */
  }
}

.emails_rows_container,
.social_links_rows_container,
.involved_persons_rows_container,
.phones_rows_container{
  position: relative;
  /* padding-bottom: 34px; */

  .email_row,
  .social_link_row,
  .involved_person_row,
  .phone_row{
    position: relative;
    font-size: 0;
    line-height: 0;
    margin: 0 -5px;

    .field,
    .inline_field{
      /* margin: 0 2px 2px 2px; */

      input{
        height: 20px;
        line-height: 20px;
        font-size: 14px;
      }

      &.iconed{

        .icon{
          width: 18px;
          height: 18px;
        }

        input{
          border-left-width: 19px;
          padding-left: 20px;
        }

      }

    }

    &.hidded{
      display: none;
    }

  }

  .button__block_row{
    position: absolute;
    background-color: white;
    top: 1px;
    right: 5px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid var(--balter-primary-color);
    transition: 0.2s all ease;
    cursor: pointer;

    img{
      position: relative;
      display: inline-block;
      color: #333;
      font-size: 16px;
      width: 12px;
      text-align: center;
      margin: 0;
      vertical-align: top;
      padding: 3px;
      overflow: hidden;
    }


    &.button__unblock_row{
      position: relative !important;
      margin: 0 0 0 auto;

    }

    &:hover{
      background-color: lightgrey;
    }

    &.hidded{
      display: none;
    }

  }

  .button__unblock_row{
    position: relative !important;
    background-color: white;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid var(--balter-primary-color);
    transition: 0.2s all ease;
    cursor: pointer;
    margin: 0 0 0 auto;

    img{
      position: relative;
      display: inline-block;
      color: #333;
      font-size: 16px;
      width: 12px;
      text-align: center;
      margin: 0;
      vertical-align: top;
      padding: 3px;
      overflow: hidden;
    }

    &:hover{
      background-color: lightgrey;
    }

    &.hidded{
      display: none;
    }

  }

}

.relations_with_persons_rows_container{
  position: relative;
  /* padding-bottom: 34px; */

  .relation_with_person_row{
    position: relative;
    font-size: 0;
    line-height: 0;

    &.hidded{
      display: none;
    }

  }

  .button__block_row{
    position: absolute;
    background-color: white;
    top: 0;
    right: 5px;
    width: 30px;
    height: 30px;
    font-size: 14px;
    line-height: 30px;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid var(--balter-primary-color);
    transition: 0.2s all ease;
    cursor: pointer;

    img{
      position: relative;
      display: inline-block;
      color: #333;
      font-size: 16px;
      width: 12px;
      text-align: center;
      margin: 0;
      vertical-align: top;
      padding: 3px;
      overflow: hidden;
    }


    &.button__unblock_row{
      position: relative !important;
      margin: 0 0 0 auto;

    }

    &:hover{
      background-color: lightgrey;
    }

    &.hidded{
      display: none;
    }

  }

  .button__unblock_row{
    position: relative !important;
    background-color: white;
    top: 0;
    right: 5px;
    width: 30px;
    height: 30px;
    font-size: 14px;
    line-height: 30px;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid var(--balter-primary-color);
    transition: 0.2s all ease;
    cursor: pointer;
    margin: 0 0 0 auto;

    img{
      position: relative;
      display: inline-block;
      color: #333;
      font-size: 16px;
      width: 22px;
      text-align: center;
      margin: 0;
      vertical-align: top;
      padding: 3px;
      overflow: hidden;
    }

    &:hover{
      background-color: lightgrey;
    }

    &.hidded{
      display: none;
    }

  }

}

/* -----Select2 option member */
.select2_option__member{
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  grid-auto-flow: row dense;
  grid-gap: 2px;
  margin: 2px;

  .avatar{
    position: relative;
    width: 26px;
    grid-column: 1;
    grid-row: 1;
  }

  .text{
    line-height: 26px;
    grid-column: 2;
    grid-row: 1;
  }

}

.info_members_overseers,
.info_members_assigned{

  .block__members_list{
    position: relative;
    margin: 10px;
    min-width: 90px;
    min-height: 70px;
    text-align: center;

    .member{
      position: relative;
      box-sizing: border-box;
      margin: 5px 0;
      background-color: #f5f5f5;
      cursor: pointer;
      padding: 3px 5px;
      width: 85px;

      &.member{
        padding: 0;

        .avatar{
          height: 85px;
        }

      }

    }

  }

}
