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

#mouse_popup{
  position: fixed;
  z-index: 1000;
  display: none;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid black;
  font-size: 12px;
  line-height: 16px;
  border-radius: 4px;
  color: white;
  padding: 0 5px;

  &.active{
    display: block;
  }
}

#mouse_popup__ajax_info{
  position: fixed;
  z-index: 1000;
  display: none;
  left: 0;
  top: 0;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid lightgrey;
  border-radius: 4px;

  &.active{
    display: block;
    animation: animation_interface__show_mouse_popup 0.3s;
  }

  .in_static_popupt__simple_description{
    position: relative;
    max-width: 400px;
    font-size: 13px;
    line-height: 15px;
    padding: 0 10px;
  }

}

@keyframes animation_interface__show_mouse_popup {
  0%   { display: block; opacity: 0; }
  /* 25%  { border-color: black #A52133 black black; } */
  50%  { display: block; opacity: 0; }
  /* 75%  { border-color: black black black #A52133; } */
  100% { display: block; opacity: 1; }
}

.static_popupt_aditional_content{
  display: none !important;
}

#interface_blocked{
  margin: 10px;
  font-size: 20px;
  line-height: 24px;

  .button_interface{
    position: relative;
    display: inline-block;
    padding: 3px;
    border: 1px solid lightgrey;
    cursor: pointer;
  }

}

#ajax_lateral_popup_container{
  position: fixed;
  z-index: 398;
  bottom: 30px;
  right: 0;
  max-width: 0;
  height: calc( 100vh - 65px);
  width: calc( 100vw - 260px );
  background-color: transparent;
  transition: 0.5s background-color ease;

  #ajax_lateral_popup{
    position: absolute;
    z-index: 399;
    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;

    &.window_width_small{
      width: 300px;
      max-width: 95%;
    }

    &.window_width_medium{
      width: 700px;
      max-width: 95%;
    }

    &.window_width_big{
      width: 1600px;
      max-width: 95%;
    }

    .title{
      font-size: 14px;
      text-align: center;
      line-height: 20px;
      border-bottom: 1px solid lightgrey;
      margin-top: 20px;
    }

    .title_v5{
      margin-top: 10px;
    }

    .lateral_avatar_area{

      .button_container{
        display: block;
        width: 130px;
        margin: 5px auto;
      }

      .only_img{
        position: relative;
        display: block;
        margin: 5px auto;
        width: 130px;
        max-height: 130px;

      }

    }

    div[data-part_name="person_avatar_area"]{
      .button_container{
        width: 100%;
        margin: 0 0 5px 0;
        box-sizing: border-box;

        .avatar_button{
          width: 100%;
          box-shadow: none;

          img{
            display: block;
            margin: 0 auto;
          }

          span{
            display: block;
            margin:  0 auto;
          }

        }

      }
    }

    div[data-part_name="person_logo_area"]{
      .button_container{
        width: 100%;
        margin: 0 0 5px 0;
        box-sizing: border-box;

        .logo_button{
          width: 100%;
          box-shadow: none;

          img{
            display: block;
            margin: 0 auto;
          }

          span{
            display: block;
            margin:  0 auto;
          }

        }

      }
    }

    .actions{
      position: relative;

      form,
      .button_container{
        position: relative;
        box-sizing: border-box;
        width: 100%;
        margin-top: 2px;
        white-space: normal;

        button,
        .button{
          position: relative;
          width: 100%;
          border: 0;
          border-left: 4px solid rgba(0, 0, 0, 0.05);
          transition: 0.3s all ease;
          vertical-align: middle;
          background-color: #fafafa;
          padding: 4px;

          img {
            position: relative;
            display: inline-block;
            vertical-align: top;
            background-color: transparent;
            width: 24px;
            height: 24px;
            padding: 3px 0;
          }

          span {
            position: relative;
            display: inline-block;
            vertical-align: top;
            font-size: 18px;
            color: #333;
            line-height: 18px;
            padding: 6px 0;
            width: calc(100% - 40px);
            transition: 0.2s all ease;
            text-align: left;
            margin: 0 5px 0 10px;
          }

          &:hover {
            background-color: #fffbfb;
            border-left: 4px #fafafa solid;

            span{
              color: var(--balter-primary-color);
            }

          }

        }

      }

    }

    .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;
      }
    }

    .list_element{
      position: relative;
      box-sizing: border-box;
      margin: 5px 0;
      background-color: #f5f5f5;
      cursor: pointer;
      padding: 3px 5px;

      .text{
        font-size: 14px;
        line-height: 20px;
      }

      .description{
        font-size: 10px;
        line-height: 12px;
      }

      &[data-active="yes"]{
        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);

    #ajax_lateral_popup{
      right: 0;
    }


    @media only screen and (max-width: 767px){
      width: 100vw;
      max-width: 100vw;
    }

  }

}

#ajax_lateral_popup_container{

  .home_notifications_area{


    #dynamic_table__container{

      .filters_2{
        .notifications_type,
        .button__clear_filters,
        .search_area{
          margin-bottom: 2px;
        }
      }

      .dataTable_dynamic_container{
        height: auto;
        max-height: 1000px;

        #dataTable_notifications{
          border: 0;
          margin: 0 auto;

          th{
            padding: 3px 10px;
          }

        }

      }

    }

    .dataTable_dynamic_container{
      height: auto;
      max-height: 1000px;
    }

    .action_buttons{
      margin: 10px 0 0px;
      padding-bottom: 10px;
      text-align: center;
      border-bottom: 1px solid lightgrey;

      .button_cotainer{

        .button{

          img{
            padding: 1px;
          }

          .text{
            padding-top: 5px;
            padding-bottom: 5px;

          }

        }

      }

    }

  }

}

.incontent_popup{
  &.popup__activity_feed__change_state{
    .popup_container{
      max-width: 800px;
    }
  }
}

/* -----END AJAX POPUP--------------------------------------------------------------------------------------------------- */
/* -----POPUP------------------------------------------------------------------------------------------------------------ */

.incontent_popup{
  position: fixed;
  transform: scale(0);
  z-index: 400;
  left: 260px;
  top: 0;
  width: calc(100vw - 260px);
  height: 100%;
  padding-top: 35px;
  background-color: transparent;

  .popup_container{
    position: relative;
    z-index: 402;
    max-width: 600px;
    /* max-height: 500px; */
    background-color: white;
    margin: 40px auto 0 auto;
    /* padding: 0 15px 15px 15px; */
    padding: 3px;
    transform: scale(0);
    opacity: 0;
    transition: 0.4s all ease;

    .popup_title{
      position: relative;
      background-color: #efefef;
      margin: 0 40px 10px 0;
      padding: 10px;
      font-size: 18px;
      line-height: 20px;
      font-weight: 600;

      .button_close_popup{
        position: absolute;
        display: block;
        right: -40px;
        top: 0;
        width: 40px;
        line-height: 40px;
        height: 40px;
        text-align: center;
        background-color: lightcyan;
        border: 1px solid #efefef;
        cursor: pointer;
        box-sizing: border-box;
        transition: 0.3s all ease;

        &:hover{
          border: 1px solid #e1e1e1;
        }
      }

    }

    .description{
      position: relative;
      font-size: 14px;
      line-height: 18px;
      font-weight: 400;
      margin-bottom: 10px;
    }

    .content{
      max-height: calc(100vh - 220px);
      overflow-y: auto;

      .content_grid{
        display: grid;
        grid-gap: 20px;
      }

      .content_group{
        position: relative;

        .content_title{
          font-size: 20px;
          line-height: 24px;
          font-weight: 600;
          border-bottom: 1px solid lightgrey;

        }

      }

    }

    .button_type_1{
      position: relative;
      margin: 5px 0 0 0;
      border: 1px solid lightblue;
      cursor: pointer;
      padding: 5px;
      text-align: center;
      transition: background-color 0.3s;

      &:hover{
        background-color: #c4dee7;
      }

      &.active{
        position: relative;
        background-color: lightblue;
        cursor: default;
      }

    }

    .save_button_type_1{
      position: relative;
      height: 35px;
      line-height: 35px;
      border-radius: 4px;
      margin: 20px auto 0 auto;
      width: 200px;
      font-size: 14px;
      cursor: pointer;
      background-color: #217600;
      color: #fff;
      transition: .3s all ease;
      text-align: center;

      &:hover{
        background-color: #185900;
      }

      &.active{
        position: relative;
        background-color: lightblue;
        cursor: default;
      }

    }

    .options_group{
      position: relative;
      display: inline-block;
      vertical-align: top;

      h3{
        margin: 10px 0 0 0;
      }
    }

    .option_type_1{
      position: relative;
      margin: 5px 0 0 0;
      cursor: pointer;
      padding: 3px;
      text-align: center;
      transition: background-color 0.3s;

      &:hover{
        background-color: #c4dee7;
      }

      &.active{
        position: relative;
        background-color: lightblue;
      }

    }

    .option_type_2{
      position: relative;
      display: block;
      margin: 5px 0 0 0;
      cursor: pointer;
      padding: 3px;
      text-align: center;
      transition: background-color 0.3s;
      font-weight: 400;
      font-size: 14px;
      line-height: 20px;
      border: 1px solid lightgrey;
      vertical-align: top;
      color: #333;
      text-shadow: 0 0 0 rgba(0, 0, 0, 0);

      &:hover{
        background-color: #c4dee7;
      }

      &.active{
        position: relative;
        background-color: lightblue;
      }

    }

    .option_description_type_2{
      position: relative;
      display: inline-block;
      width: calc( 100% - 220px);
      font-size: 14px;
      line-height: 16px;
      font-weight: 400;
      vertical-align: top;
    }

    .options_group{
      position: relative;
      display: block;
    }

    .table_fixed_container{
      position: relative;
      height: auto;
      max-height: calc( 100vh - 220px);
      overflow: auto;
      margin: -2px 0 0 0;

      table{
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        margin: 0;

        thead{
          th{
            position: sticky;
            top: -2px;
          }
        }

        tfoot{
          th{
            position: sticky;
            bottom: -4px;
          }
        }
      }


    }

  }

  .popup_backlayer{
    position: absolute;
    z-index: 401;
    transform: scale(0);
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    transition: 0.4s background-color ease;

  }

  &.active{
    transform: scale(1);

    .popup_container{
      transform: scale(1);
      opacity: 1;
    }

    .popup_backlayer{
      transform: scale(1);
      background-color: rgba(0, 0, 0, 0.6);

    }
  }

  &.popup__person_selector,
  &.incontent_popup_person,
  &.incontent_popup_movements{

    .popup_container{
      max-width: 100%;
      margin: 25px;
    }
  }


  @media only screen and (max-width: 960px){
    width: 100vw;
    left: 0;
  }

}

.generic_interface.ajax_popup_interface{
  position: relative;
  padding: 0 10px 70px 10px;
  height: auto;
  overflow: hidden; /* si lo necesitas usa "popup_content" para agregar scroll */

}

/* -----AJAX POPUP------------------------------------------------------------------------------------------------------- */

.popup_ajax{
  position: fixed;
  transform: scale(0);
  z-index: 400;
  left: 260px;
  top: 0;
  width: calc(100vw - 260px);
  height: 100%;
  padding-top: 60px;
  background-color: transparent;

  &[data-etype="popup__add_dossier_tasks_from_template"]{
    .popup{
      max-width: 400px;
    }
  }


  &[data-etype="popup__digital_certificate__details"],
  &[data-etype="popup__avatar"],
  &[data-etype="popup__logo"],
  &[data-etype="popup__translations__export_to_csv"],
  &[data-etype="popup__digital_certificate__upload"]{
    .popup{
      max-width: 400px;
      /* margin: 30px 30px auto auto; */
      margin:0 auto;
    }
  }


  &[data-etype="popup__manage_access_data"],
  &[data-etype="popup__generate_complaint_chat_by_invitation"],
  &[data-etype="popup__estimate_to_vidsigner_send"],
  &[data-etype="popup__delete_entity_and_related"],
  &[data-etype="popup__emitted_invoice__cancel"],
  &[data-etype="popup__emitted_invoice__modify"],
  &[data-etype="popup__emitted_invoice__delete"],
  &[data-etype="popup__article_family"],
  &[data-etype="popup__notification"],
  &[data-etype="popup__bank"],
  &[data-etype="popup__person_bank_account"],
  &[data-etype="popup__charge"],
  &[data-etype="popup__invoice_emitted_charges"],
  &[data-etype="popup__invoice_serie"],
  &[data-etype="popup__bonus_element"],
  &[data-etype="popup__business_campaign"],
  &[data-etype="popup__transfer_entity_to_partner"],
  &[data-etype="popup__dossier_text_review_request__edit"],
  &[data-etype="popup__person__copy_to_other_company"],
  &[data-etype="popup__person__create_his_first_employee"],
  &[data-etype="popup__person__public_information_finder"]{
    .popup{
      max-width: 640px;
    }
  }

  &[data-etype="popup__legal_notification"],
  &[data-etype="popup__declarations_to_mail_send"],
  &[data-etype="popup__woo_order__add_invoice"],
  &[data-etype="popup__add_invoice_to_dossier"],
  &[data-etype="popup__declaration_control"],
  &[data-etype="popup__protocols_group"],
  &[data-etype="popup__company_inventory_location"],
  &[data-etype="popup__company_inventory_group"],
  &[data-etype="popup__company_inventory_unit"],
  &[data-etype="popup__module_contract"],
  &[data-etype="popup__category"],
  &[data-etype="popup__service__legal_notification"]{
    .popup{
      max-width: 640px;
      margin:0 auto;
    }
  }


  &[data-etype="dossier_task"]{
    .popup{
      max-width: 700px;
    }
  }


  &[data-etype="popup__average_time_for_contact"]{
    .popup{
      max-width: 720px;
    }
  }

  &[data-etype="popup__person_contacts_activity"]{
    .popup{
      max-width: 720px;
      /* margin: 30px 30px auto auto; */
      margin:0 auto;
    }
  }


  &[data-etype="popup__person_bank_data"]{
    .popup{
      max-width: 840px;
    }
  }


  &[data-etype="popup__technical_problems_form"],
  &[data-etype="popup__emitted_invoice__normalize_simplified"],
  &[data-etype="popup__translations__import_from_csv"]{
    .popup{
      max-width: 850px;
    }
  }


  &[data-etype="popup__facturae__download"],
  &[data-etype="popup__complaint__update_activity"],
  &[data-etype="popup__estimate__update_activity"],
  &[data-etype="popup__chance__update_activity"],
  &[data-etype="popup__dossier__update_activity"],
  &[data-etype="popup__article"]{
    .popup{
      max-width: 900px;
    }
  }


  &[data-etype="popup__dossier_observation__edit"],
  &[data-etype="popup__bank_remittance"],
  &[data-etype="departament"],
  &[data-etype="popup__billing_order"],
  &[data-etype="popup__invoice_emitted_to_mail_send"],
  &[data-etype="popup__estimate_to_mail_send"],
  &[data-etype="popup__invoice_emitted_event_details"]{
    .popup{
      max-width: 1024px;
    }
  }

  &[data-etype="popup__person__add_new_unified"],
  &[data-etype="popup__person_contacts_report"],
  &[data-etype="popup__declaration_details"],
  &[data-etype="popup__woo_order__create_invoice"]{
    .popup{
      max-width: 1024px;
      /* margin: 30px 30px auto auto; */
      margin: 0 auto;
    }
  }


  &[data-etype="popup__person_form"]{
    .popup{
      max-width: 1100px;
      height: calc(100vh - 100px);

      .popup_content{
        max-height: calc(100vh - 110px);
      }
    }
  }


  &[data-etype="sale_of_companies__operation"]{
    .popup{
      max-width: 1100px;
      height: calc(100vh - 100px);

      .popup_content{
        max-height: calc(100vh - 110px);
      }
    }
  }


  &[data-etype="popup__contract_plan"]{
    .popup{
      max-width: 1100px;
      max-height: calc(100vh - 160px);

      .popup_content{
        max-height: calc(100vh - 170px);
      }
    }
  }

  &[data-etype="popup__billing_operation"]{
    .popup{
      max-width: 1360px;
    }
  }


  &[data-etype="popup__modules_contract"]{
    .popup{
      max-width: 1366px;
      /* margin: 30px 30px auto auto; */
      margin:0 auto;
    }
  }


  &[data-etype="popup__bank_remittance_emission"]{
    .popup{
      max-width: calc( 100vw - 350px );
    }
  }



  .popup_backlayer{
    position: absolute;
    z-index: 401;
    transform: scale(0);
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    transition: 0.4s background-color ease;
  }

  .popup{
    position: relative;
    z-index: 402;
    max-width: calc( 100% - 40px );
    background-color: white;
    margin: 20px auto 0 auto;
    transform: scale(0);
    opacity: 0;
    transition: 0.4s all ease;

    .button_close_popup{
      position: absolute;
      z-index: 95;
      display: block;
      right: 0;
      top: 0;
      width: 40px;
      line-height: 40px;
      height: 40px;
      text-align: center;
      background-color: lightcyan;
      border: 1px solid #efefef;
      cursor: pointer;
      box-sizing: border-box;
      transition: 0.3s all ease;

      &:hover{
        border: 1px solid #e1e1e1;
      }
    }

    .popup_content{
      max-height: calc(100vh - 150px);
      overflow-y: auto;

      .popup_inner{
        padding-top: 60px;

        h1{
          position: fixed;
          left: 0;
          top: 0;
        }

      }

      .content_grid{
        display: grid;
        grid-gap: 20px;
      }

      .content_group{
        position: relative;

        .content_title{
          font-size: 20px;
          line-height: 24px;
          font-weight: 600;
          border-bottom: 1px solid lightgrey;

        }

      }

    }

  }

  &.active{
    transform: scale(1);

    .popup_backlayer{
      transform: scale(1);
      background-color: rgba(0, 0, 0, 0.6);
    }

    .popup{
      transform: scale(1);
      opacity: 1;
      border: 3px solid lightblue;
    }

  }

  @media only screen and (max-width: 960px){
    width: 100vw;
    left: 0;
  }

}
