.modal {
  &-opened {
    overflow: hidden;
  }

  position: fixed;
  background-color: rgba(0, 0, 0, 0.65);
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 9999;
  overflow-y: auto;

  @include breakpoint(mobile) {
    z-index: 100000;
  }

  &__body {
    width: 100%;
    max-width: 30rem;
    margin: 5rem auto;

    background-color: $white;
    border-radius: $radius;

    &--no-content-padding {
      .modal__content {
        padding: 0;
      }
    }

    &--wide {
      max-width: 50rem;
    }

    @include breakpoint(mobile) {
      min-height: 100vh;
      margin: 0;
      border-radius: 0;
    }
  }

  &__header {
    padding: .5rem 1rem;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.5;
    border-bottom: 1px solid #eee;

    @include breakpoint(mobile) {
      position: relative;

      .modal--right {
        position: absolute;
        top: 0;
        padding: 6px 1rem 0 1rem;
        right: 0;
        background-color: white;
      }
    }

    &-buttons {
      font-weight: normal;
    }
  }

  &__close {
    opacity: .5;
    cursor: pointer;
    &:hover {
      opacity: .8;
    }
  }

  &--right {
    float: right;
  }

  &__content {
    padding: 1rem;
  }

  &__footer {
    padding: 1rem;
    border-top: 1px solid #eee;
  }
}

.inline-editor, .modal {
  &__footer {
    text-align: right;

    .button {
      display: inline-block !important;
      margin-left: 4px !important;
    }
    .footer-confirm {
      margin: 0;
      padding: 0;
      display: flex;
      align-items: center;

      @include breakpoint(mobile) {
        display: block;
        &__message {
          padding-right: 0;
          padding-bottom: 10px;
        }
      }

      &__buttons {
        flex-shrink: 0;

        &--left {
          margin-right: auto;
          flex-grow: 1;
          text-align: left;
        }
      }

      &__message {
        margin-right: auto;
        &.__alert {
          color: $alert-color;
        }
        &.__right {
          flex-grow: 1;
          padding-right: 10px;
          text-align: right;
        }
      }
    }
  }
}

.inline-editor {
  &__body {
    padding: 0 1rem;
    max-width: 28rem;
    margin: 0 auto;

    @include breakpoint(mobile) {
      padding: .25rem 0;
    }
  }
  &__header {
    padding-bottom: 1rem;
  }
  &__content {
    //padding: 0 .5rem;
  }
  &__footer {
    padding: 1rem 0;
    border-radius: 4px;
    margin-top: 1rem;
    //border-top: #f7f7f7;
    .disabled {
      &:after {
        //background-color: rgba(247, 247, 247, 0.5);
      }
    }
  }
  &__back {
    padding: 3px 12px 3px 5px;
    display: inline-block;
    border-radius: 3px;
    border: 1px solid #e8e8e8;
    transition: border-color .2s ease;
    &.disabled {
      pointer-events: none;
    }
    &:hover {
      cursor: pointer;
      border-color: $primary-color;
    }
  }
}

.eddbk-error-message {
  color: $alert-color;
  &--client {
    width: 40%;
    float: left;
  }
}

.modal-transition {
  &-enter, &-leave-to {
    opacity: 0;

    .modal__body {
      opacity: 0;
      transform: scaleX(.8) scaleY(.7);
    }
  }

  &-enter-active, &-leave-active {
    transition: opacity 0.25s ease-out;

    .modal__body {
      transition: all .25s cubic-bezier(.665,1.65,0,.845);
    }
  }
}

.booking-status {
  padding: 6px 20px;
  margin-top: -5px;
  border-radius: 4px;
  position: relative;
  font-size: 16px;
  margin-left: 1rem;

  @include breakpoint(mobile) {
    display: inline-block;
    margin-left: 0;
    margin-top: 0;
  }

  span {
    position: relative;
  }

  &:before {
    border-radius: 4px;
    position: absolute;
    content: '';
    left: 1px;
    top: 1px;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    background: #fff;
    opacity: .25;
  }
}

.eddbk-help {
  color: $primary-color;
  vertical-align: middle;
}

.eddbk-help-link {
  display: block;
  text-decoration: none;
  color: $gray;
  span {
    opacity: .75;
  }
  &:hover {
    color: $medium-gray;
  }
  &:focus {
    color: $medium-gray;
  }
}