@import './components/variables';

@import './components/animations';

.wadi_modal {
  background-color: rgba(0, 0, 0, 0.377);
  // transition: all ease 1s;
  // animation:fadeout .5s;
  
  // &.fade {
  //   animation:flip-2-hor-top-1 3s;
  // }

  &.active {
    display: block;
    opacity: 1;
  }

}

.wadi_modal_button_trigger_container {
  display: flex;
  
  button {
    cursor: pointer;
  }
}

.wadi_modal_trigger_icon_container {
  display: flex;

  i, svg {
    cursor: pointer;
  }
}

.wadi_modal_trigger_image_container {
  display: flex;
  width: 100%;

  img {
    // width: 100%;
    cursor: pointer;
  }
}

.wadi_modal_trigger_text_container {
  display: flex;

  .wadi_modal_text_trigger {
    cursor: pointer;
  }
}

.wadi_modal_content_close_button {
  display: inline-block;
  cursor: pointer;
}

.wadi_modal_closing_icon {
  width: max-content;
  cursor: pointer;
  display: block;
  float: left;
}

.modal-content {
    border-radius: 0;
    background-color: $wadi_secondary_color;
    padding: 1.5rem;
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    outline: 0;
}
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  display: none;
  overflow: hidden;
  outline: 0;
  
}


body.admin-bar {
  .modal {
    top: 32px;
  }
}

.modal-dialog {
  margin: 1.75rem auto;
  max-width: 500px;
}

.modal-dialog-centered {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  min-height: calc(100% - (0.5rem * 2));
}

.modal-dialog-centered {
  min-height: calc(100% - (1.75rem * 2));
}

.modal-body {
  position: relative;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem auto;
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: -webkit-transform 0.3s ease-out;
  transition: transform 0.3s ease-out;
  transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
  -webkit-transform: translate(0, -25%);
  transform: translate(0, -25%);
  -webkit-transform: translate(0, 0);
  transform: translate(0, 0);
}


/* Important part */
.modal-dialog{
  overflow-y: initial !important
}
.modal-body{
  max-height: 80vh;
  overflow-y: auto;
}


// FullScreen Modal

.wadi_moda_type_full_screen {

  .modal-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    position: fixed;
    .modal-content {
      height: 100%;
      width: 100%;
    }
  }
}


.wadi_modal_button_trigger_container {
  display: flex;
}
