$modal-padding: 15px;

@mixin make-center {
  width: 780px;
  margin: 0 auto;
}

.modal {
  display: none;

  &.is-active  {
    display: block;
  }
}

.is-modal-open {
  overflow: hidden;
}

.modal__content {
  position: fixed;
  top: 40px;
  right: 0;
  bottom: 68px;
  left: 0;
  z-index: $z-index-modal;

  padding: $modal-padding;

  overflow: auto;
  background: white;

  @include media-breakpoint-up(md) {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;

    padding: 0 $grid-gutter-width-base/2;
  }
}

.modal__dialog {
  width: 100%;
  min-height: 100%;

  background: white;

  @include media-breakpoint-up(md) {
    @include make-center();

    padding-top: 115px;
    padding-bottom: 85px;
    padding-left: 30px;
    padding-right: 30px;
  }
}

.modal__header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: $z-index-modal;

  width: 100%;
  height: 40px;
  padding: 0 $modal-padding;

  background: $color-blue;

  @include media-breakpoint-up(md) {
    right: auto;
    left: auto;

    max-width: 720px;
    height: 115px;
    padding: 0;

    background: white;
  }
}

.modal__close {
  display: block;
  float: right;

  height: 40px;
  width: 40px;

  font-size: 14px;
  text-align: center;
  line-height: 40px;

  color: white;

  &:hover {
    color: white;
    cursor: pointer;
  }

  @include media-breakpoint-up(md) {
    margin-top: 20px;

    font-size: 21px;

    color: $color-gray--darker;

    &:hover {
      color: $color-blue;
    }
  }
}

.modal__close-icon {
  margin-top: 8px;
}

.modal__heading {
  padding: 9px 0 5px 0;
  margin-right: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  @include media-breakpoint-up(md) {
    padding: 0;
    margin-right: 0;
  }
}

.modal__footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: $z-index-modal;

  width: 100%;
  height: 68px;
  padding: 10px 0 15px 0;

  background: $color-gray--lighter;

  @include media-breakpoint-up(md) {
    right: auto;
    left: auto;

    max-width: 720px;
    height: 85px;
    padding: 0;
    border-top: none;

    background: white;
  }
}

.modal__footer__wrapper {
  @include media-breakpoint-up(md) {
    padding-top: 27px;
  }
}

.modal__buttons {
  float: right;
}

.modal__buttons__button {
  margin-right: $modal-padding;
}

// Copyright AXA Versicherungen AG 2015
