@import 'src/assets/styles/responsive-base.scss';

#search-bar {
  width: 100%;
  height: 28px;
  max-width: 400px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
}

#search mat-icon {
  font-size: 16px;
  height: 16px;
  width: 16px;
  line-height: 16px;
  margin-right: 8px;
}

#search label {
  height: 16px;
}

#search #search-input:focus {
  outline: none;
}

#search {
  position: relative;
  display: flex;
}
#search-input {
  width: 100%;
  padding-right: 20px;
  box-sizing: border-box;
  height: 100%;
  background-color: transparent;
  border: none;

  &::-webkit-search-decoration,
  &::-webkit-search-cancel-button,
  &::-webkit-search-results-button,
  &::-webkit-search-results-decoration {
    display: none;
  }
}

/* TODO(mdc-migration): The following rule targets internal classes of list that may no longer apply for the MDC version. */
.mat-list-text {
  flex-direction: row;
}

.desktop-phone {
  @include screen('phone') {
    width: 135% !important;
    left: -15% !important;
  }
}

#search #search-options {
  position: absolute;
  max-height: min(400px, calc(100vh - 40px));
  overflow-y: auto;
  max-width: 400px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  box-sizing: border-box;
  width: 100%;
  flex: 1 1 auto;
  top: 26px;
  left: 0;
  padding: 4px 0;
  z-index: 100;

  .option {
    padding: 2px 4px 2px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;

    app-avatar {
      flex-shrink: 0;
      width: 18px;
      margin: 0 8px 0 0;
    }
    span {
      overflow-x: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
.room-name {
  margin-left: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.nowrap {
  white-space: nowrap;
}

.icon-box {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.3);
  mat-icon {
    margin-right: 0px !important;
    vertical-align: middle;
    font-size: 14px !important;
    padding: 0 2px;
  }
  span {
    margin-right: 0px !important;
    vertical-align: middle;
    font-size: 14px !important;
    padding: 0 4px;
  }
}
