﻿.imessage {
    background-color: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    font-family: "SanFrancisco";
    font-size: 1.1rem;
    margin: 0 auto 1rem;
    max-width: 100%;
    padding: 0.5rem 1.5rem;
    height: 360px;
    overflow: auto;
}

    .imessage p {
        border-radius: 1.15rem;
        line-height: 1.15;
        max-width: 100%;
        padding: 0.5rem .875rem;
        position: relative;
        word-wrap: break-word;
    }

        .imessage p::before,
        .imessage p::after {
            bottom: -0.1rem;
            content: "";
            height: 1rem;
            position: absolute;
        }

p.owner {
    border: 5px solid orange;
}

    p.owner.department {
        background-color: #bfdefd;
    }

    p.owner.public {
        background-color: #248bf5;
        color: #EEE;
    }

    p.owner::before {
        border-bottom-left-radius: 0.8rem 0.7rem;
        border-right: 1rem solid orange;
        right: -16px;
        transform: translate(0, -0.1rem);
    }

    p.owner::after {
        background-color: #fff;
        border-bottom-left-radius: 0.5rem;
        right: -46px;
        transform: translate(-30px, -2px);
        width: 11px;
    }

p.owner {
    align-self: flex-end;
    max-width: 60%;
}

/*p.owner ~ p.owner {
    margin: 0.25rem 0 0;
}*/

p.right ~ p.right:last-child {
    margin-bottom: 0.5rem;
}


p.right.public {
    background-color: #248bf5;
    color: #EEE;
}

p.right.special {
    background-color: #fffeaa;
    color: #333;
}

p.right.department {
    background-color: #bfdefd;
}

    p.right.department::before {
        border-bottom-left-radius: 0.8rem 0.7rem;
        border-right: 1rem solid #bfdefd;
        right: -0.35rem;
        transform: translate(0, -0.1rem);
    }

.center.special {
    background-color: #fffeaa;
    color: #333;
    padding: 8px;
    margin: 1rem 0 1rem 0;
    border: 1px solid #AAA;
}

p.right {
    align-self: flex-end;
    max-width: 60%;
}

    p.right::before {
        border-bottom-left-radius: 0.8rem 0.7rem;
        border-right: 1rem solid #248bf5;
        right: -0.35rem;
        transform: translate(0, -0.1rem);
    }

    p.right::after {
        background-color: #fff;
        border-bottom-left-radius: 0.5rem;
        right: -40px;
        transform: translate(-30px, -2px);
        width: 10px;
    }

    p.right ~ p.right {
        margin: 0.25rem 0 0;
    }

        /*p.right ~ p.right:not(:last-child) {
            margin: 0.25rem 0 0;
        }*/

        p.right ~ p.right:last-child {
            margin-bottom: 0.5rem;
        }




p[class^="left"] {
    margin: 0.5rem 0;
    width: fit-content;
}

p.left {
    align-items: flex-start;
    background-color: #85c259;
    color: #222;
}

    p.left:before {
        border-bottom-right-radius: 0.8rem 0.7rem;
        border-left: 1rem solid #85c259;
        left: -0.35rem;
        transform: translate(0, -0.1rem);
    }

    p.left::after {
        background-color: #fff;
        border-bottom-right-radius: 0.5rem;
        left: 20px;
        transform: translate(-30px, -2px);
        width: 10px;
    }

p[class^="from-"].emoji {
    background: none;
    font-size: 2.5rem;
}

    p[class^="from-"].emoji::before {
        content: none;
    }

.no-tail::before {
    display: none;
}

.margin-b_none {
    margin-bottom: 0 !important;
}

.margin-b_one {
    margin-bottom: 1rem !important;
}

.margin-t_one {
    margin-top: 1rem !important;
}

.internal {
    background-color: #fffeaa !important;
    border: 1px solid #BBB;
}

.none {
    display: none;
}








/* general styling */
@font-face {
    font-family: "SanFrancisco";
    src: url("https://cdn.rawgit.com/AllThingsSmitty/fonts/25983b71/SanFrancisco/sanfranciscodisplay-regular-webfont.woff2") format("woff2"), url("https://cdn.rawgit.com/AllThingsSmitty/fonts/25983b71/SanFrancisco/sanfranciscodisplay-regular-webfont.woff") format("woff");
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: normal;
    margin: 0;
}

.container {
    margin: 0 auto;
    max-width: 600px;
    padding: 1rem;
}

h1 {
    font-weight: normal;
    margin-bottom: 0.5rem;
}

h2 {
    border-bottom: 1px solid #e5e5ea;
    color: #666;
    font-weight: normal;
    margin-top: 0;
    padding-bottom: 1.5rem;
}

.comment {
    background-color: #EEE;
    color: #333;
    border: 1px solid #AAA;
    font-size: 1.1rem;
    line-height: 1.15;
    margin: 5px 0 5px 0;
    width: 100%;
    padding: 0;
}

@media screen and (max-width: 800px) {
    body {
        margin: 0 0.5rem;
    }

    .container {
        padding: 0.5rem;
    }

    .imessage {
        font-size: 1.05rem;
        margin: 0 auto 1rem;
        max-width: 600px;
        padding: 0.25rem 0.875rem;
    }

        .imessage p {
            margin: 0.5rem 0;
        }
}
