// Modals

.modal {

  // Modal Header

  .modal-header {
    background-color: $body-bg;
    border-radius: .42rem;
    padding: .8rem;
    border-bottom: none;

    // close button

    .close {
      padding: .2rem .62rem;
      box-shadow: 0 5px 20px 0 rgba($pure-black, .1);
      border-radius: .357rem;
      background: $white;
      opacity: 1;
      transition: all .23s ease .1s;
      position: relative;
      transform: translate(8px, -2px);
      span{
        font-weight: 400;
        font-size: 2rem;
        color: $primary;
      }
      // For hover effect of close btn

      &:hover,
      &:focus,&:active {
        opacity: 1;
        outline: none;
        transform: translate(5px, 3px);
        box-shadow: none;
      }
    }

    &[class*="bg-"]{
      color: $white;
      border-bottom-left-radius: 5px;
      border-bottom-right-radius: 5px;

      .modal-title {
        color: $white;
      }
    }

    // Themed Modals
    &.bg-primary {
      .close {
        span {
          color: $primary;
        }
      }
    }

    &.bg-success {
      .close {
        span {
          color: $success;
        }
      }
    }

    &.bg-info {
      .close {
        span {
          color: $info;
        }
      }
    }

    &.bg-danger {
      .close {
        span {
          color: $danger;
        }
      }
    }

    &.bg-warning {
      .close {
        span {
          color: $warning;
        }
      }
    }

    &.bg-dark {
      .close {
        span {
          color: $dark;
        }
      }
    }
  }

  // Modal Content
  .modal-content {
    border: none;
    // overflow: unset; updated to "visible" as close icon is not visible in IE
    overflow: visible;
    box-shadow: 0 5px 20px 0 rgba($pure-black, .1);
  }

  // Modal Footer
  .modal-footer {
    border-color: rgba($pure-black, .05);
  }
}

// Modal SM
.modal-sm {
  max-width: 400px;
}

// Modal XS
.modal-xs {
  max-width: 300px;
}

// Modal XL
.modal-xl {
  max-width: 94%;
  margin-left: 3%;
  margin-right: 3%;
}

// To remove Max-width of XS Modal in Small Screen

@media(max-width:576px) {
  .modal {
    padding-right: 1rem;
    padding-left: 1rem;
    .modal-xs,
    .modal-sm {
      max-width: unset;
    }
  }
}
