﻿/* Comic speech bubbles (Objects/Comic/SpeechBubble): face and bubble; the bubble points at the face.
   Left speaker in the mouth colour, right speaker (IsRight) in the tongue colour. */

.speech-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
}

.speech-row.is-right {
    flex-direction: row-reverse;
}

.speech-face {
    flex: none;
    width: 112px;
    height: 112px;
    object-fit: contain;
}

.speech-bubble {
    --speech-color: var(--en-mouth);
    position: relative;
    max-width: 36rem;
    padding: 12px 16px;
    border: 2px solid var(--speech-color);
    border-radius: var(--en-radius-lg);
    background: var(--en-surface);
    line-height: 1.6;
    overflow-wrap: break-word;
}

.speech-row.is-right .speech-bubble {
    --speech-color: var(--en-tongue);
}

/* Tail: a rotated square with the bubble's background and two borders */
.speech-bubble::after {
    content: "";
    position: absolute;
    top: 22px;
    left: -9px;
    width: 14px;
    height: 14px;
    border-left: 2px solid var(--speech-color);
    border-bottom: 2px solid var(--speech-color);
    background: var(--en-surface);
    transform: rotate(45deg);
}

.speech-row.is-right .speech-bubble::after {
    left: auto;
    right: -9px;
    border: 0;
    border-top: 2px solid var(--speech-color);
    border-right: 2px solid var(--speech-color);
}

@media (max-width: 560px) {
    .speech-row {
        gap: 14px;
        margin-top: 20px;
    }

    .speech-face {
        width: 64px;
        height: 64px;
    }
}
