.sc-message { margin: auto; padding: 0 0.5rem 0 0; display: flex; margin-bottom: 0.25rem; &:first-child { margin-top: 50%; } &.sent { flex-direction: row-reverse; .sc-message--content { justify-content: flex-end; .sc-message--avatar { display: none; } .sc-message--wrapper { align-items: flex-end; .sc-message--text { color: white; background-color: #4e8cff; word-wrap: break-word; } .sc-message--meta { flex-direction: row-reverse; } } } } .sc-message--content { display: flex; flex-direction: row; position: relative; max-width: calc(100% - 40px); // same as avatar spacing width: auto; .sc-message--avatar { width: 32px; height: 32px; margin-right: 4px; margin: 2px 4px; background-position: 0 0; flex-shrink: 0; background-size: cover; border-radius: 100%; } .sc-message--wrapper { display: flex; flex-direction: column; overflow: hidden; word-break: break-word; .sc-message--text { padding: 10px 20px; border-radius: 0.5rem; font-weight: 400; font-size: 0.9rem; line-height: 1.5; position: relative; -webkit-font-smoothing: subpixel-antialiased; color: #263238; background-color: #f4f7f9; .sc-message--text-body { .sc-message--text-content { white-space: pre-wrap; } } } .sc-message--meta { display: flex; justify-content: space-between; align-items: flex-start; font-size: 0.65rem; margin-top: 4px; padding: 0 4px; width: 100%; height: 18px; box-sizing: border-box; } } } } @media (max-width: 450px) { .sc-message { width: 80%; } }