@use '../../partials/dir';

.room-input {
  padding: var(--sp-extra-tight) calc(var(--sp-normal) - 2px);
  display: flex;
  min-height: 56px;

  &__alert {
    margin: auto;
    padding: 0 var(--sp-tight);
    text-align: center;
  }

  &__input-container {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;

    margin: 0 calc(var(--sp-tight)  - 2px);
    background-color: var(--bg-surface-low);
    box-shadow: var(--bs-surface-border);
    border-radius: var(--bo-radius);

    & > .ic-raw {
      transform: scale(0.8);
      margin: 0 var(--sp-extra-tight);
    }
 
    & .scrollbar {
      max-height: 50vh;
      flex: 1;

      &:first-child {
        @include dir.side(margin, var(--sp-tight), 0);
      }
    }
  }

  &__textarea-wrapper {
    min-height: 40px;
    display: flex;
    align-items: center;

    & textarea {
      resize: none;
      width: 100%;
      min-width: 0;
      min-height: 100%;
      padding: var(--sp-ultra-tight) 0;

      &::placeholder {
        color: var(--tc-surface-low);
      }
      &:focus {
        outline: none;
      }
    }
  }
}

.room-attachment {
  --side-spacing: calc(var(--sp-normal) + var(--av-small) + var(--sp-tight));
  display: flex;
  align-items: center;
  @include dir.side(margin, var(--side-spacing), 0);
  margin-top: var(--sp-extra-tight);
  line-height: 0;

  &__preview > img {
    max-height: 40px;
    border-radius: var(--bo-radius);
    max-width: 150px;
  }
  &__icon {
    padding: var(--sp-extra-tight);
    background-color: var(--bg-surface-low);
    box-shadow: var(--bs-surface-border);
    border-radius: var(--bo-radius);
  }
  &__info {
    flex: 1;
    min-width: 0;
    margin: 0 var(--sp-tight);
  }

  &__option button {
    transition: transform 200ms ease-in-out;
    transform: translateY(-48px);
    & .ic-raw {
      transition: transform 200ms ease-in-out;
      transform: rotate(45deg);
      background-color: var(--bg-caution);
    }
  }
}

.room-reply {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-low);
  border-bottom: 1px solid var(--bg-surface-border);

  & .ic-btn-surface {
    @include dir.side(margin, 17px, 13px);
    border-radius: 0;
  }
}