.modal {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: var(--modal-background-color);
  padding: 0 20px;
  z-index: 100;
  overflow-y: auto;

  .content {
    position: relative;
    max-width: 350px;
    margin: 100px auto;
    padding: 1em;
    background-color: var(--modal-background-content-color);
    border-radius: var(--border-radius);
    overflow: auto;
    box-shadow: var(--modal-drop-shadow);
  }
}

/* remove scroll bars */
.loki-dialog .add-moderators-dialog .content {
  padding: 1.1em;
}

.session-modal {
  .contact-selection-list {
    width: 100%;
    min-width: 300px;
  }

  &__input-group {
    min-width: 300px;
  }
}

.add-moderators-dialog,
.remove-moderators-dialog,
.invite-friends-dialog {
  .content {
    max-width: 100% !important;
  }
  .contact-selection-list {
    width: 100%;
  }

  .buttons {
    margin: 8px;
  }

  .group-name {
    font-size: larger;
  }

  .titleText {
    font-size: large;
    text-align: center;
  }

  .no-contacts {
    text-align: center;
  }

  .hidden {
    display: none;
  }
}

.add-moderators-dialog,
.remove-moderators-dialog,
.edit-profile-dialog {
  .error-message {
    text-align: center;
    color: var(--danger-color);
    display: block;
    user-select: none;
  }

  .error-faded {
    opacity: 0;
    margin-top: -5px;
    transition: all 100ms linear;
  }

  .error-shown {
    opacity: 1;
    transition: all 250ms linear;
  }
}

.loki-dialog {
  display: flex;
  align-items: center;
  justify-content: center;

  .content {
    max-width: 75%;
    min-width: 60%;
    padding: 1em;
    background: var(--modal-background-content-color);
    border-radius: var(--border-radius);
    overflow: auto;
    box-shadow: 0px 0px 15px 0px var(--modal-background-color);
  }

  input[type='radio'] {
    width: inherit;
  }

  input:not([type='radio']) {
    width: 100%;
  }

  input {
    padding: 8px;
    margin-bottom: 15px;
    border: 0;
    outline: none;
    border-radius: 4px;

    &:focus {
      outline: none;
    }
  }

  h4 {
    margin-top: 8px;
    margin-bottom: 16px;
  }
}

.loki-dialog {
  & ~ .index.inbox {
    // filter: blur(2px); // FIXME enable back once modals are moved to react
    // currently it cause an issues with toast being on the foreground when a modal is shown
    transition: filter 0.1s;
  }

  input {
    background-color: var(--input-background-color);
    color: var(--input-text-color);
    border: 1px solid var(--input-border-color);

    &::placeholder {
      color: var(--input-text-placeholder-color);
    }
  }
}

.edit-profile-dialog {
  .session-modal__header__title {
    font-size: var(--font-size-lg);
  }

  .session-modal {
    width: $session-modal-size-md;

    &__header {
      height: 68.45px;
    }
  }

  .avatar-center-inner {
    position: relative;

    .qr-view-button {
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      right: -3px;
      height: 30px;
      width: 30px;
      border-radius: 50%;
      background-color: var(--white-color);
      transition: var(--default-duration);

      &:hover {
        filter: brightness(90%);
      }

      .session-icon-button {
        opacity: 1;
      }
    }
  }

  .session-id-section {
    display: flex;
    align-items: center;
    flex-direction: column;
    .session-button {
      width: 148px;
    }
  }

  .profile-name {
    display: flex;
    justify-content: center;
    margin-top: var(--margins-lg);

    input {
      height: 38px;
      border-radius: 5px;
      text-align: center;
      font-size: $session-font-md;
    }

    &-uneditable {
      display: flex;
      align-items: center;
      justify-content: center;

      p {
        font-size: $session-font-md;
        padding: 0px var(--margins-sm);
      }

      .session-icon-button {
        padding: 0px;
      }
    }
  }
}

.reaction-list-modal {
  .session-confirm-wrapper {
    .session-modal__body {
      width: 376px;
      padding: 0;
      .session-modal__centered {
        margin: 0;
      }
    }
  }
}
