/* Chat */

.bubbles {
  padding: 0 15px;
  overflow-y: auto;

  .bubble {
    position: relative;
    margin: 0 10% var(--gutter-y) 10%;
    padding: ~"calc(var(--gutter-y)/2)" var(--gutter-x);
    background: #e5e5ea;
    border-radius: 1.5rem;
    color: #000;

    &.remote, &.local {
      &:before {
        content: '';
        position: absolute;
        bottom: -2px;
        height: 20px;
        transform: translate(0, -2px);
      }
      &:after {
        content: '';
        position: absolute;
        bottom: -2px;
        width: 26px;
        height: 20px;
        background: #fcfcfc;
        transform: translate(-30px, -2px);
      }
    }

    &.remote {
      margin: 0 10% var(--gutter-y) 0;
      &:before {
        left: -7px;
        border-left: 20px solid #e5e5ea;
        border-end-start-radius: 0;
        border-end-end-radius: 16px 14px;
      }
      &:after {
        bottom: -2px;
        left: 4px;
        border-end-end-radius: 10px;
      }
    }

    &.local {
      margin: 0 0 var(--gutter-y) 10%;
      background: #0b93f6;
      color: #fff;
      &:before {
        right: -7px;
        border-right: 20px solid #0b93f6;
        border-end-start-radius: 16px 14px;
      }
      &:after {
        right: -56px;
        border-end-start-radius: 10px;
      }
    }

    &.event {
      background: transparent;
      border: 1px dashed #ccc;
      color: inherit;
    }

    /* Colors */

    &.me, &.staff {

      &.local:after {
        border-color: #0b93f6;
      }
    }

    &.customer:after {
      content: "";
      position: absolute;
      bottom: 0;
      width: var(--gutter-x);
      height: var(--gutter-y);
    }

    .text {
    }

    textarea {
      height: 4em;
      padding: 0;
      box-sizing: border-box;
      color: inherit;
      background: transparent;
      border: none;
      outline: none;
      box-shadow: none;
    }

    .date {
      padding-top: 0.5em;
      font-size: 0.8em;
      text-align: center;
      opacity: 0.5;
    }

    .remove {
      position: absolute;
      top: 0.5em;
      right: 0.5em;
      color: inherit;
    }
  }
}
