/*****body******/

#workskin * {
    font:
        100%/1.125 "Lucida Grande",
        "Lucida Sans Unicode",
        Verdana,
        Helvetica,
        sans-serif,
        "GNU Unifont";
}

#workskin .phone {
    width: 300px;
    font-family: "Segoe UI";
    display: flex;
    flex-direction: column;
    background-color: #98bad5;
    margin: auto;
}

#workskin .messagebody {
    display: table;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

/*****header******/

#workskin .contact {
    background-color: #98bad5;
    border-bottom: 1px solid black;
    color: #000000;
    font-weight: bold;
    padding: 0.5em;
    text-align: left;
    text-transform: capitalize;
    display: flex;
    gap: 0.5rem;
}

#workskin .contact span {
    font-weight: bold;
}

#workskin .icon-back {
    position: absolute;
    left: 0em;
    top: 0.8rem;
    width: 2.5rem;
    height: 2.5rem;
    fill: #007aff;
}

/* back arrow
#workskin .contact::before {
  content: "";
  position: absolute;
  left: 1em;a
  top: 2em;
  margin: auto;
  width: 1em;
  height: 1em;
  border-left: 2.5px solid #007aff;
  border-bottom: 2.5px solid #007aff;
  transform: rotate(45deg);
} */

#workskin .text {
    z-index: 1;
    position: relative;
    word-break: break-word;
}

#workskin .contactpic {
    position: relative;
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    /* top: 6em; */
    z-index: 1;
    border: 1px solid #b2b2b2;
}

/******actions********/

#workskin .message--action {
    clear: both;
    text-align: center;
    font-size: 0.7rem;
    font-style: italic;
    color: #8e8e93;
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
}

/******texts********/

/* space for the tails */
#workskin .in,
#workskin .out {
    margin-left: 0.625em;
    margin-right: 0.625em;
    position: relative;
}

/* shared text features */
#workskin .in dd {
    float: left;
    color: #000000;
    margin-left: 50px;
    margin-right: 0 0 0.5em;
    border-radius: 1em;
    padding: 0.5em 1em;
    background: white;
    max-width: 75%;
    clear: both;
    position: relative;
}

#workskin .out dd {
    float: right;
    color: #000000;
    margin: 0 0 0.5em;
    border-radius: 1em;
    padding: 0.5em;
    background: #ffe401;
    max-width: 75%;
    clear: none;
    position: relative;
}

/* tails */
#workskin .out dd:last-of-type::after {
    content: "";
    position: absolute;
    right: -0.5em;
    top: 0;
    width: 0.5em;
    height: 1em;
    border-left: 0.625em solid #ffe401;
    border-top-left-radius: 1em 0.5em;
}

#workskin .in dd:last-of-type::after {
    content: "";
    position: absolute;
    top: 0;
    width: 0.5em;
    height: 1em;
    left: -0.5em;
    border-right: 0.625em solid white;
    border-top-right-radius: 1em 0.5em;
}

#workskin .space {
    margin-top: 1rem;
}

#workskin .out dd {
    float: right;
    background: #ffe401;
    color: black;
}

#workskin .in dd {
    float: left;
    background: white;
    color: black;
}

/***other message things****/

/* no tail */
#workskin dd.pic::after,
#workskin dd.emoji::after {
    display: none;
}

/* 3x emoji */
#workskin dd.emoji {
    background: none;
    padding: 0;
    font-size: 3em;
}

/* picture */
#workskin dd.pic {
    background: none;
    padding: 0;
    overflow: hidden;
}
#workskin dd.pic img {
    max-width: 100%;
    display: block;
}

/* plain link */
#workskin dd a {
    word-break: break-all;
    color: inherit;
}

/**************************************************
*		rich link
**************************************************/
#workskin dd.richlink {
    padding: 0;
    color: black;
    background: #e5e5ea !important;
}
/* Even outgoing texts are incoming-colored */
#workskin dd.richlink::after {
    border-color: #e5e5ea !important;
}

#workskin dd.richlink a {
    display: table;
    font-size: 0.75rem;
    word-break: normal;
    text-decoration: none;
    border: none;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    overflow: hidden;
}

#workskin dd.richlink a iframe,
#workskin dd.richlink a img {
    display: table-row;
    border: none;
    max-width: 100%;
}
/* default aspect ratio, 16:9 */
#workskin dd.richlink a iframe {
    width: 210px;
    height: 118px;
}
/* aspect ratio 4:3 */
#workskin dd.richlink a iframe.SD {
    width: 210px;
    height: 157px;
}
/* tall narrow images can't be THAT big */
#workskin dd.richlink a img {
    max-height: 250px;
}

#workskin dd.richlink a .caption {
    display: table-caption;
    caption-side: bottom;
    position: relative;
    margin: 1em 1.5em;
    color: black;
}
#workskin dd.richlink a .caption b {
    display: block;
    margin-bottom: 0.5em;
    color: black;
}

/* arrow, if it's a video */
#workskin dd.richlink a iframe + .caption {
    margin-right: 2.5em;
}
#workskin dd.richlink a iframe + .caption::after {
    content: "";
    position: absolute;
    right: -1em;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 0.75em;
    height: 0.75em;
    border-right: 1.5px solid #8e8e93;
    border-bottom: 1.5px solid #8e8e93;
    transform: rotate(-45deg);
}

/**************************************************
*		Typing dot-dot-dot
**************************************************/
/* weird tail*/
#workskin .in dd.typing::before,
#workskin .in dd.typing::after {
    content: "";
    position: absolute;
    border-radius: 100%;
    background: #e5e5ea;
    border: none;
}
#workskin .in dd.typing::after {
    bottom: 0;
    left: -0.15625em;
    width: 0.625em;
    height: 0.625em;
}
#workskin .in dd.typing::before {
    bottom: -0.2em;
    left: -0.3125em;
    width: 0.3125em;
    height: 0.3125em;
}

/* dots */
#workskin .in dd.typing div {
    height: 0.625em;
    width: 0.625em;
    border-radius: 100%;
    background: #8e8e93;
    display: inline-block;
    margin: 0.125em 0;
}
#workskin .in dd.typing div:nth-child(1) {
    opacity: 0.4;
}
#workskin .in dd.typing div:nth-child(2) {
    opacity: 0.7;
}
#workskin .in dd.typing div:nth-child(3) {
    opacity: 1;
}

/**************************************************
*	little grey text stuff
*	(aka time + read receipts + grouptext-mode names)
**************************************************/
#workskin .time,
#workskin .in dt {
    clear: both;
    font-weight: normal;
    color: #8e8e93;
    font-size: 0.75rem;
}
#workskin .in .avatar {
    width: 40px;
    height: 40px;
    float: left;
    border-radius: 40%;
    position: absolute;
}

#workskin .in dd:last-child,
#workskin .out dd:last-child {
    margin-bottom: 1rem;
}

/* time */
#workskin .time {
    display: block;
    text-align: center;
    margin: 0;
    padding: 1rem;
}

/* read receipt / timestamp */
#workskin .out .read {
    position: absolute;
    right: 100%;
    bottom: 0;
    margin-right: 0.3rem;
    white-space: nowrap;
    font-weight: normal;
    color: #8e8e93;
    font-size: 0.65rem;
}

#workskin .in .read {
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 0.3rem;
    white-space: nowrap;
    font-weight: normal;
    color: #8e8e93;
    font-size: 0.65rem;
}

/* show the names with incoming texts for grouptext mode */
#workskin .in dt {
    padding-left: 2.8rem;
    padding-bottom: 0.5rem;
    display: table !important;
}
/**************************************************
*		Type bar footer
**************************************************/
#workskin .footer {
    clear: both;
    position: relative;
    margin: 0.25em;
}

/* camera icon */
#workskin .footer::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2em;
    width: 3em;
    background: url("https://raw.githubusercontent.com/Azdaema/AO3-Skin_Messaging/master/FontAwesome/black/fa-camera.png")
        no-repeat center;
    background-size: auto 1.25em;
    opacity: 0.5;
}

/*  the bit with a border where you type in the text  */
#workskin .footer .typebar {
    position: relative;
    display: block;
    font-size: 1rem;
    border: 1px solid rgba(60, 60, 67, 0.29);
    box-sizing: border-box;
    border-radius: 1em;
    margin-left: 3em;
    padding-right: 2.5em;
    padding: 0.25em 1em;
    line-height: 1.5em;
}

/* Send button */
#workskin .footer .typebar::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0.2em;
    height: 1.6em;
    width: 1.6em;
    border-radius: 100%;
    background-image: url("https://raw.githubusercontent.com/Azdaema/AO3-Skin_Messaging/master/FontAwesome/white/fa-arrow-up.png");
    background-repeat: no-repeat;
    background-position: center;
    background-color: #007aff;
    background-size: auto 0.7em;
}

/* blue caret */
#workskin .footer .typebar::after {
    content: "";
    border-right: 2px solid #007aff;
}

/* filler text if typebar is empty */
#workskin .footer .typebar:empty::after {
    color: rgba(60, 60, 67, 0.29);
    content: "iMessage";
    /* the border is on the left side here, not right */
    border: none;
    border-left: 2px solid #007aff;
}

/**************************************************
*		other stuff
**************************************************/

/*popup*/

#workskin .letter {
    background-size: 100% 25px;
    min-width: 300px;
    max-width: 300px;
    margin: 0 auto 25px;
    display: table;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    border-radius: 25px;
    padding: 10px 16px;
}

#workskin .innerletter {
    color: #000000;
    text-align: left;
    display: block;
    line-height: 5px;
    font-size: 15px;
}

#workskin .popup {
    background-size: 100% 25px;
    min-width: 300px;
    max-width: 300px;
    margin: 0 auto 25px;
    display: table;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    border-radius: 5px;
    padding: 0.25px 16px;
}

#workskin .innerpopup {
    color: #000000;
    text-align: left;
    display: block;
    line-height: 3px;
    font-size: 15px;
}

/*paragraph dividers*/

#workskin .hr {
    width: 25%;
    color: a3a8ac;
    opacity: 25%;
    margin-bottom: 2em;
    margin-top: 2em;
}

#workskin .hr2 {
    width: 15%;
    color: a3a8ac;
    opacity: 15%;
    margin-bottom: 1em;
    margin-top: 1em;
}