// Transition
@mixin transition($args) {
  -webkit-transition: $args;
  -moz-transition: $args;
  -ms-transition: $args;
  -o-transition: $args;
  transition: $args;
}

// Display Flex
@mixin display() {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}

// Align Items
@mixin align-items($args) {
  -webkit-align-items: $args;
  align-items: $args;
}

/*------------------------------------------------------------------
Modal
-------------------------------------------------------------------*/
.oew-modal-button {
  .elementor-align-icon-left {
    margin-right: 4px;
  }

  .elementor-align-icon-right {
    margin-left: 4px;
  }

  i,
  svg {
    width: 1em;
    height: 1em;
    position: relative;
    vertical-align: bottom;
  }
}

.oew-align-left {
  text-align: left;
}

.oew-align-center {
  text-align: center;
}

.oew-align-right {
  text-align: right;
}

.oew-align-justify .oew-modal-button a {
  width: 100%;
}

.oew-modal-wrap {
  display: none;
  overflow-y: auto;
  padding: 15px;

  &.oew-temp-styles {
    display: block;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    padding: 0 !important;
  }

  &,
  .oew-modal-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  .oew-modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    width: 100%;
    height: 100%;
  }

  .oew-modal-container {
    height: 100%;
  }

  .oew-modal-inner {
    position: relative;
    background-color: #fff;
    width: 600px;
    max-width: 100%;
    margin: 0 auto;
    padding: 30px;
    z-index: 10000;
  }
}

@media (min-width: 959px) {
  .oew-modal-wrap {
    .oew-modal-container {
      @include display();
      @include align-items(center);
    }
  }
}

@media (min-width: 640px) {
  .oew-modal-wrap {
    padding: 50px 30px;
  }
}

.oew-modal-wrap.oew-modal-full {
  padding: 0;

  .oew-modal-inner {
    width: 100%;
    height: 100%;
  }
}

.oew-modal-wrap.has-template .oew-modal-inner {
  padding: 0;
}

.oew-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  text-align: center;
  z-index: 10000;

  svg {
    @include transition(all 0.3s ease-in-out);
  }

  &:hover svg {
    fill: #777;
  }
}

.oew-modal-close {
  &-inside {
    svg {
      fill: #333;
    }

    &:hover svg {
      fill: #777;
    }
  }

  &-outside {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;

    svg {
      fill: #fff;
      width: 24px;
      height: 24px;
    }

    &:hover svg {
      fill: #eee;
    }
  }
}

.oew-modal-closed {
  display: none !important;
}

/* RTL */
body.rtl {
  .oew-modal-button {
    .elementor-align-icon-left {
      margin-left: 4px;
      margin-right: 0;
    }

    .elementor-align-icon-right {
      margin-right: 4px;
      margin-left: 0;
    }
  }
}

/*------------------------------------------------------------------
Responsive
-------------------------------------------------------------------*/
@media only screen and (max-width: 1024px) {
  .oew-tablet-align-left {
    text-align: left;
  }

  .oew-tablet-align-center {
    text-align: center;
  }

  .oew-tablet-align-right {
    text-align: right;
  }
}

@media only screen and (max-width: 767px) {
  .oew-mobile-align-left {
    text-align: left;
  }

  .oew-mobile-align-center {
    text-align: center;
  }

  .oew-mobile-align-right {
    text-align: right;
  }

  .oew-modal-close {
    &-outside {
      top: 10px;
      right: 10px;
    }
  }
}

@media only screen and (max-width: 480px) {
  .oew-modal-close {
    &-outside {
      display: none;
    }
  }
}
