.mc-chat {
    position: fixed;
    z-index: 9998;
    font-family: inherit;
    color: #111827;
}

.mc-chat * {
    box-sizing: border-box;
}

.mc-chat__launcher,
.mc-chat__teaser-message,
.mc-chat__teaser-close,
.mc-chat__close,
.mc-chat__send,
.mc-chat__option {
    font-family: inherit;
}

.mc-chat__launcher {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.2);
}

.mc-chat__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--mc-chat-color);
    border: 2px solid #ffffff;
}

.mc-chat__avatar--launcher {
    width: 64px;
    height: 64px;
    border: 3px solid var(--mc-chat-color);
}

.mc-chat__avatar--header {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
}

.mc-chat__avatar--fallback i {
    font-size: 22px;
}

.mc-chat__online-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #ffffff;
    position: absolute;
    right: 1px;
    bottom: 4px;
}

/* Respostas não lidas com o chat fechado. */
.mc-chat__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #e11d48;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.mc-chat__badge[hidden] {
    display: none;
}

.mc-chat__teaser {
    position: absolute;
    right: 8px;
    bottom: 82px;
    width: min(310px, calc(100vw - 34px));
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.mc-chat[style*="left"] .mc-chat__teaser {
    right: auto;
    left: 8px;
}

.mc-chat.is-open .mc-chat__teaser,
.mc-chat.is-teaser-hidden .mc-chat__teaser:not(.mc-chat__teaser--reply),
.mc-chat__teaser--reply[hidden] {
    display: none;
}

/* Prévia da resposta: quem respondeu em cima, o texto em até três linhas, "Ver resposta" embaixo */
.mc-chat__reply-author {
    color: var(--mc-chat-color);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.mc-chat__reply-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.mc-chat__teaser-message {
    width: 100%;
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.45;
    text-align: left;
    padding: 14px 16px;
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.14);
    cursor: pointer;
}

.mc-chat__teaser-message span,
.mc-chat__teaser-message strong,
.mc-chat__teaser-message small {
    display: block;
}

.mc-chat__teaser-message strong {
    color: var(--mc-chat-color);
    font-size: 13px;
    line-height: 1.25;
    margin-top: 8px;
}

.mc-chat__teaser-message small {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.3;
    margin-top: 6px;
}

.mc-chat__teaser-close {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
    flex: 0 0 24px;
}

.mc-chat__panel {
    width: min(430px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 40px - var(--mc-chat-cookie-offset, 0px)));
    margin-bottom: 14px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 72px rgba(17, 24, 39, 0.26);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.mc-chat.is-open .mc-chat__panel {
    display: flex;
}

.mc-chat.is-open .mc-chat__launcher {
    display: none;
}

.mc-chat__header {
    background: var(--mc-chat-color);
    color: #ffffff;
    padding: 14px 18px;
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-chat__identity {
    flex: 1;
    min-width: 0;
}

.mc-chat__title,
.mc-chat__subtitle {
    margin: 0;
    overflow-wrap: anywhere;
}

.mc-chat__title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.mc-chat__subtitle {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.95;
}

.mc-chat__close {
    width: 30px;
    height: 30px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    flex: 0 0 30px;
}

.mc-chat__body {
    flex: 1;
    min-height: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.mc-chat__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 24px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--mc-chat-color) #f3f4f6;
}

.mc-chat__messages::-webkit-scrollbar {
    width: 6px;
}

.mc-chat__messages::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.mc-chat__messages::-webkit-scrollbar-thumb {
    background: var(--mc-chat-color);
    border-radius: 999px;
}

.mc-chat__row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.mc-chat__row--visitor {
    justify-content: flex-end;
}

.mc-chat__message-stack {
    max-width: 82%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Hora no canto do balão e, na mensagem do visitante, os tiques (mesma regra do painel e do app de Atendimento). */
.mc-chat__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin: 3px -4px -5px 12px;
    color: #8a919c;
    font-size: calc(var(--mc-chat-fs, 13px) * 0.8);
    font-weight: 400;
    line-height: 14px;
    white-space: nowrap;
}

/* Selo de mensagem corrigida pelo atendente, discreto antes do horário. */
.mc-chat__edited {
    font-style: italic;
    margin-right: 2px;
}

.mc-chat__meta--visitor {
    color: rgba(255, 255, 255, 0.78);
}

/* No balão de mídia a hora fica com o respiro da legenda. */
.mc-chat__bubble--media .mc-chat__meta {
    margin: 2px 8px 4px;
}

.mc-chat__sticker-wrap {
    flex-direction: column;
    align-items: flex-start;
}

.mc-chat__row--visitor .mc-chat__sticker-wrap {
    align-items: flex-end;
}

.mc-chat__sticker-wrap .mc-chat__meta {
    margin: 2px 4px 0;
}

.mc-chat__tick {
    display: inline-flex;
    color: inherit;
}

.mc-chat__tick svg {
    width: 15px;
    height: 15px;
}

.mc-chat__tick.is-pending svg {
    width: 12px;
    height: 12px;
}

/* Lida: verde-limão no balão colorido, o mesmo do painel (--inbox-message-status-read) e do app de Atendimento. */
.mc-chat__meta--visitor .mc-chat__tick.is-read {
    color: #c7ff00;
}

.mc-chat__bubble {
    padding: 13px 16px;
    border-radius: 20px;
    font-size: var(--mc-chat-fs, 13px);
    line-height: 1.42;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.mc-chat__bubble--visitor {
    background: var(--mc-chat-color);
    color: #ffffff;
    border-bottom-right-radius: 8px;
}

.mc-chat__bubble--agent {
    background: #f0f1f3;
    color: #111827;
    border-bottom-left-radius: 8px;
}

.mc-chat__agent-name {
    margin-bottom: 2px;
    color: var(--mc-chat-color);
    font-size: calc(var(--mc-chat-fs, 13px) * 0.85);
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
}

.mc-chat__bubble--media .mc-chat__agent-name {
    padding: 2px 6px 4px;
    margin-bottom: 0;
}

/* Cartão do produto (buildProductBubble), no desenho da bolha do painel: foto, texto, rodapé e botão. */
.mc-chat__bubble--product {
    width: 260px;
    max-width: 100%;
    padding: 4px;
    border-radius: 18px;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-chat__bubble--product .mc-chat__agent-name {
    padding: 2px 6px 0;
    margin-bottom: 0;
}

.mc-chat__product-photo {
    display: block;
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.mc-chat__product-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mc-chat__product-info {
    padding: 6px 10px 0;
}

.mc-chat__product-text {
    white-space: pre-wrap;
    font-weight: 400;
}

.mc-chat__product-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.mc-chat__product-foot .mc-chat__meta {
    margin: 0 -2px 2px auto;
}

.mc-chat__product-hint {
    color: #6b7280;
    font-size: 12px;
}

.mc-chat__product-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 8px 8px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    color: var(--mc-chat-color);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.mc-chat__product-action:hover {
    text-decoration: underline;
}

.mc-chat__product-action .mc-chat__icon svg {
    width: 16px;
    height: 16px;
}

/* Produto que saiu do catálogo depois do envio: selo apagado e o aviso, como no painel. */
.mc-chat__bubble--product-removed {
    white-space: normal;
}

.mc-chat__product-removed {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-chat__product-seal {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
}

.mc-chat__product-removed-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.mc-chat__product-removed-text span {
    color: #6b7280;
    font-size: 12px;
}

.mc-chat__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.mc-chat__option {
    border: 0;
    border-radius: 999px;
    background: var(--mc-chat-color);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    padding: 12px 18px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.mc-chat__composer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    background: #ffffff;
}

.mc-chat__composer.is-hidden {
    display: none;
}

.mc-chat__composer-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.mc-chat__field {
    width: 100%;
    min-height: 48px;
    max-height: 120px;
    resize: none;
    border: 2px solid #111827;
    border-radius: 24px;
    background: #ffffff;
    color: #111827;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    outline: none;
    overflow-y: auto;
}

/* Campo com o X de limpar por cima, à direita */
.mc-chat__field-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.mc-chat__composer.has-text .mc-chat__field {
    padding-right: 40px;
}

.mc-chat__clear {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s ease, color 0.12s ease;
}

.mc-chat__clear svg {
    width: 18px;
    height: 18px;
}

.mc-chat__composer.has-text .mc-chat__clear {
    display: inline-flex;
}

.mc-chat__clear:hover:not(:disabled) {
    background: #f3f4f6;
    color: #111827;
}

.mc-chat__clear:disabled {
    opacity: 0.6;
    cursor: progress;
}

.mc-chat__field.is-multiline {
    border-radius: 18px;
}

.mc-chat__field:focus {
    border-color: var(--mc-chat-color);
    box-shadow: 0 0 0 3px rgba(31, 122, 236, 0.12);
}

.mc-chat__send {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--mc-chat-color);
    color: #ffffff;
    cursor: pointer;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.mc-chat__send:active:not(:disabled) {
    transform: scale(0.94);
}

.mc-chat__send svg {
    width: 22px;
    height: 22px;
}

.mc-chat__send:disabled,
.mc-chat__field:disabled,
.mc-chat__tool:disabled {
    opacity: 0.6;
    cursor: progress;
}

.mc-chat__composer.can-record .mc-chat__submit,
.mc-chat__composer.can-record.has-content .mc-chat__mic {
    display: none;
}

.mc-chat__composer.can-record.has-content .mc-chat__submit {
    display: inline-flex;
}

.mc-chat__composer.is-sending .mc-chat__submit,
.mc-chat__composer.is-sending .mc-chat__mic,
.mc-chat__composer.is-sending .mc-chat__recorder-send {
    opacity: 0.6;
    cursor: progress;
}

.mc-chat__credit {
    height: 22px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    background: #ffffff;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
}

.mc-chat__credit a {
    color: #374151;
    font-weight: 700;
    text-decoration: none;
}

.mc-chat__credit a:hover {
    color: #111827;
    text-decoration: underline;
}

.mc-chat__error {
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffd7d2;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 12px 12px 0;
    font-size: 12px;
    line-height: 1.35;
    display: none;
}

.mc-chat.has-error .mc-chat__error {
    display: block;
}

/* Convite dos avisos do navegador, acima do campo de mensagem. */
.mc-chat__push {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 8px;
    padding: 8px 8px 8px 12px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 12px;
    line-height: 1.35;
    color: #374151;
}

.mc-chat__push[hidden] {
    display: none;
}

.mc-chat__push-text {
    flex: 1;
    min-width: 0;
}

.mc-chat__push-on {
    border: 0;
    border-radius: 6px;
    padding: 6px 10px;
    background: var(--mc-chat-color);
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.mc-chat__push-close {
    border: 0;
    background: transparent;
    color: #6b7280;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
}

/* Identificação (e-mail, cadastro e código) cobre a conversa até o cliente entrar. */
.mc-chat__body {
    position: relative;
}

.mc-chat__identify {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #ffffff;
    overflow-y: auto;
    display: flex;
    align-items: center;
    padding: 24px;
}

.mc-chat__identify[hidden] {
    display: none;
}

.mc-chat__identify-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mc-chat__identify-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
}

.mc-chat__identify-text {
    margin: -6px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: #4b5563;
    overflow-wrap: anywhere;
}

.mc-chat__identify-error {
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
}

.mc-chat__identify-error:empty {
    display: none;
}

.mc-chat__identify-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-chat__identify-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.mc-chat__identify-input {
    width: 100%;
    height: 48px;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    color: #111827;
    background: #ffffff;
    outline: none;
}

.mc-chat__identify-input:focus {
    border-color: var(--mc-chat-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc-chat-color) 18%, transparent);
}

/* WhatsApp: país (bandeira e DDI) ao lado do número. */
.mc-chat__phone {
    display: flex;
    gap: 8px;
}

.mc-chat__phone-country {
    flex: 0 0 112px;
    width: 112px;
    padding: 0 8px;
    text-overflow: ellipsis;
}

.mc-chat__identify-code {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
}

.mc-chat__identify-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
    cursor: pointer;
}

.mc-chat__identify-consent input {
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--mc-chat-color);
}

.mc-chat__identify-submit {
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--mc-chat-color);
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.mc-chat__identify-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.mc-chat__identify-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
}

.mc-chat__identify-link {
    border: 0;
    background: transparent;
    padding: 4px 0;
    font: inherit;
    font-size: 13px;
    color: var(--mc-chat-color);
    cursor: pointer;
}

.mc-chat__identify-link:hover {
    text-decoration: underline;
}

.mc-chat__typing-bubble {
    width: 66px;
    height: 42px;
    border-radius: 20px;
    background: #f0f1f3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mc-chat__typing-bubble span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c7c9ce;
    animation: mc-chat-typing 1s infinite ease-in-out;
}

.mc-chat__typing-bubble span:nth-child(2) {
    animation-delay: 0.15s;
}

.mc-chat__typing-bubble span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes mc-chat-typing {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 575.98px) {
    .mc-chat {
        right: 12px !important;
        left: 12px !important;
        bottom: calc(12px + var(--mc-chat-cookie-offset, 0px)) !important;
    }

    .mc-chat__panel {
        width: 100%;
        height: min(640px, calc(100vh - 24px - var(--mc-chat-cookie-offset, 0px)));
        margin-bottom: 0;
    }

    .mc-chat__teaser {
        right: 0;
        left: 0;
        width: 100%;
    }

    .mc-chat__message-stack {
        max-width: 86%;
    }

    .mc-chat__messages {
        padding: 16px 12px 10px;
    }
}

.mc-chat__panel {
    position: relative;
}

.mc-chat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.mc-chat__icon svg,
.mc-chat__tool svg {
    width: 20px;
    height: 20px;
}

.mc-chat button:focus-visible,
.mc-chat a:focus-visible,
.mc-chat__wave:focus-visible,
.mc-chat-lightbox button:focus-visible,
.mc-chat-lightbox a:focus-visible {
    outline: 2px solid var(--mc-chat-color);
    outline-offset: 2px;
}

.mc-chat__tool {
    width: 44px;
    height: 48px;
    flex: 0 0 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    transition: background 0.12s ease, color 0.12s ease;
}

.mc-chat__tool:hover:not(:disabled) {
    background: #f3f4f6;
    color: var(--mc-chat-color);
}

.mc-chat__file-input {
    display: none;
}

.mc-chat__attachments {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 2px;
    scrollbar-width: thin;
}

.mc-chat__composer.has-attachments .mc-chat__attachments {
    display: flex;
}

.mc-chat__tile {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: #f0f1f3;
    border: 1px solid rgba(17, 24, 39, 0.08);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-chat__tile img,
.mc-chat__tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    display: block;
    background: #e5e7eb;
}

.mc-chat__tile-fallback {
    display: none;
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
}

.mc-chat__tile.is-broken img,
.mc-chat__tile.is-broken video,
.mc-chat__tile.is-broken .mc-chat__tile-play {
    display: none;
}

.mc-chat__tile.is-broken .mc-chat__tile-fallback {
    display: block;
}

.mc-chat__tile-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mc-chat__tile-play svg {
    width: 12px;
    height: 12px;
    margin-left: 2px;
}

.mc-chat__tile--file {
    width: 196px;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 30px 0 10px;
}

.mc-chat__tile-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-chat__tile-name {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-chat__tile-size {
    font-size: 11px;
    color: #6b7280;
}

.mc-chat__tile--more {
    cursor: pointer;
    color: #6b7280;
    border: 2px dashed #d1d5db;
    background: #ffffff;
    padding: 0;
    font-family: inherit;
}

.mc-chat__tile--more:hover {
    color: var(--mc-chat-color);
    border-color: var(--mc-chat-color);
}

.mc-chat__tile-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #111827;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1;
}

.mc-chat__tile-remove::after {
    content: "";
    position: absolute;
    inset: -10px;
}

.mc-chat__tile-remove svg {
    width: 12px;
    height: 12px;
    stroke-width: 3;
}

.mc-chat__recorder {
    display: none;
    align-items: center;
    gap: 8px;
}

.mc-chat__composer.is-recording .mc-chat__recorder,
.mc-chat__composer.is-previewing .mc-chat__recorder {
    display: flex;
}

.mc-chat__composer.is-recording .mc-chat__composer-row,
.mc-chat__composer.is-previewing .mc-chat__composer-row,
.mc-chat__composer.is-recording .mc-chat__attachments,
.mc-chat__composer.is-previewing .mc-chat__attachments {
    display: none;
}

.mc-chat__recorder-live,
.mc-chat__recorder-preview {
    flex: 1;
    min-width: 0;
    height: 48px;
    border-radius: 24px;
    background: #f0f1f3;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

.mc-chat__recorder-preview {
    padding: 0 4px 0 4px;
}

.mc-chat__composer.is-recording .mc-chat__recorder-live,
.mc-chat__composer.is-previewing .mc-chat__recorder-preview {
    display: flex;
}

.mc-chat__recorder-pause,
.mc-chat__recorder-stop,
.mc-chat__recorder-send {
    display: none;
}

.mc-chat__composer.is-recording .mc-chat__recorder-pause,
.mc-chat__composer.is-recording .mc-chat__recorder-stop,
.mc-chat__composer.is-previewing .mc-chat__recorder-send {
    display: inline-flex;
}

.mc-chat__composer.is-recording.cannot-pause .mc-chat__recorder-pause {
    display: none;
}

.mc-chat__recorder-discard:hover:not(:disabled) {
    color: #dc2626;
    background: #fef2f2;
}

.mc-chat__rec-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: mc-chat-rec 1.1s infinite ease-in-out;
}

.mc-chat__composer.is-paused .mc-chat__rec-dot {
    background: #9ca3af;
    animation: none;
}

.mc-chat__rec-paused {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.mc-chat__composer.is-paused .mc-chat__rec-paused {
    display: inline;
}

.mc-chat__composer.is-paused .mc-chat__rec-wave {
    opacity: 0.45;
}

.mc-chat__rec-time {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
    min-width: 38px;
}

.mc-chat__rec-wave {
    flex: 1;
    min-width: 0;
    height: 30px;
    display: block;
}

@keyframes mc-chat-rec {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.8);
    }
}

.mc-chat__drop {
    position: absolute;
    inset: 78px 0 0;
    z-index: 5;
    display: none;
    padding: 14px;
    background: rgba(255, 255, 255, 0.92);
    pointer-events: none;
}

.mc-chat__panel.is-dragging .mc-chat__drop {
    display: block;
}

.mc-chat__drop-inner {
    height: 100%;
    border: 2px dashed var(--mc-chat-color);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #4b5563;
    font-size: 13px;
    text-align: center;
}

.mc-chat__drop-inner strong {
    color: #111827;
    font-size: 16px;
}

.mc-chat__drop-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--mc-chat-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.mc-chat__bubble--media {
    padding: 4px;
    border-radius: 18px;
    white-space: normal;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-chat__bubble--media.mc-chat__bubble--visitor {
    border-bottom-right-radius: 6px;
}

.mc-chat__bubble--media.mc-chat__bubble--agent {
    border-bottom-left-radius: 6px;
}

.mc-chat__bubble--audio,
.mc-chat__bubble--voice {
    min-width: min(260px, 100%);
}

.mc-chat__caption {
    padding: 4px 10px 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.mc-chat__media {
    position: relative;
    display: block;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(17, 24, 39, 0.06);
    border-radius: 14px;
    overflow: hidden;
    font-family: inherit;
    color: inherit;
}

.mc-chat__media--image {
    width: 240px;
    max-width: 100%;
    min-height: 120px;
    cursor: zoom-in;
}

.mc-chat__media--image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
}

.mc-chat__media.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 80%);
    background-size: 200% 100%;
    animation: mc-chat-shimmer 1.2s infinite linear;
    pointer-events: none;
}

@keyframes mc-chat-shimmer {
    from {
        background-position: 150% 0;
    }

    to {
        background-position: -50% 0;
    }
}

.mc-chat__media--sticker {
    width: 140px;
    height: 140px;
    background: transparent;
    border-radius: 12px;
}

.mc-chat__media--sticker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mc-chat__sticker-wrap {
    display: flex;
}

.mc-chat__row--visitor .mc-chat__sticker-wrap {
    justify-content: flex-end;
}

.mc-chat__media--video {
    width: 260px;
    max-width: 100%;
    min-height: 146px;
    background: #111827;
}

.mc-chat__media--video video {
    display: block;
    width: 100%;
    max-height: 360px;
    background: #000000;
}

.mc-chat__video-play {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.mc-chat__media--video.is-started .mc-chat__video-play {
    display: none;
}

.mc-chat__video-play-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: transform 0.15s ease;
}

.mc-chat__video-play:hover .mc-chat__video-play-icon {
    transform: scale(1.06);
}

.mc-chat__video-play-icon svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
}

.mc-chat__video-duration {
    position: absolute;
    left: 10px;
    bottom: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.mc-chat__media-retry {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: rgba(17, 24, 39, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.mc-chat__media.is-failed .mc-chat__media-retry {
    display: flex;
}

.mc-chat__media.is-failed .mc-chat__video-play {
    z-index: 2;
    opacity: 0;
}

.mc-chat__media.is-failed::before {
    display: none;
}

.mc-chat__media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: 260px;
    max-width: 100%;
}

.mc-chat__media-grid .mc-chat__media {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.mc-chat__media-grid .mc-chat__media img,
.mc-chat__media-grid .mc-chat__media video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.mc-chat__audio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 4px 4px;
    min-width: 0;
    width: 100%;
    --mc-wave-idle: #b8bcc4;
    --mc-wave-played: var(--mc-chat-color);
    --mc-audio-button-bg: var(--mc-chat-color);
    --mc-audio-button-fg: #ffffff;
    --mc-audio-meta: #6b7280;
}

.mc-chat__audio--visitor {
    --mc-wave-idle: rgba(255, 255, 255, 0.45);
    --mc-wave-played: #ffffff;
    --mc-audio-button-bg: #ffffff;
    --mc-audio-button-fg: var(--mc-chat-color);
    --mc-audio-meta: rgba(255, 255, 255, 0.85);
}

.mc-chat__audio--composer {
    padding: 0;
}

.mc-chat__audio audio {
    display: none;
}

.mc-chat__audio-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 0;
    border-radius: 50%;
    background: var(--mc-audio-button-bg);
    color: var(--mc-audio-button-fg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.12s ease;
}

.mc-chat__audio-toggle:active {
    transform: scale(0.94);
}

.mc-chat__audio-toggle svg {
    width: 18px;
    height: 18px;
}

.mc-chat__audio:not(.is-playing) .mc-chat__audio-toggle svg {
    margin-left: 2px;
}

.mc-chat__audio-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mc-chat__wave {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    touch-action: none;
    border-radius: 4px;
}

.mc-chat__wave-bar {
    flex: 1 1 0;
    min-width: 2px;
    max-width: 4px;
    min-height: 3px;
    border-radius: 2px;
    background: var(--mc-wave-idle);
    transition: background 0.1s linear;
    pointer-events: none;
}

.mc-chat__wave-bar.is-played {
    background: var(--mc-wave-played);
}

.mc-chat__wave-knob {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--mc-wave-played);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mc-chat__audio.is-active .mc-chat__wave-knob {
    opacity: 1;
}

.mc-chat__audio-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mc-audio-meta);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.mc-chat__audio-retry {
    display: none;
}

.mc-chat__audio.is-failed .mc-chat__audio-time {
    display: none;
}

.mc-chat__audio.is-failed .mc-chat__audio-retry {
    display: inline;
}

.mc-chat__audio.is-loading .mc-chat__audio-toggle {
    opacity: 0.7;
}

.mc-chat__audio-side {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-chat__audio-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.08);
    color: var(--mc-wave-played);
}

.mc-chat__audio--visitor .mc-chat__audio-badge {
    background: rgba(255, 255, 255, 0.18);
}

.mc-chat__audio-badge svg {
    width: 17px;
    height: 17px;
}

.mc-chat__audio-speed {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.mc-chat__audio-speed span {
    min-width: 34px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: var(--mc-audio-button-bg);
    color: var(--mc-audio-button-fg);
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mc-chat__audio.is-active .mc-chat__audio-badge {
    display: none;
}

.mc-chat__audio.is-active .mc-chat__audio-speed {
    display: inline-flex;
}

.mc-chat__doc {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 260px;
    max-width: 100%;
    min-height: 56px;
    padding: 8px 8px 8px 10px;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.06);
    color: inherit;
    text-decoration: none;
}

.mc-chat__bubble--visitor .mc-chat__doc {
    background: rgba(255, 255, 255, 0.16);
}

a.mc-chat__doc:hover {
    background: rgba(17, 24, 39, 0.1);
}

.mc-chat__bubble--visitor a.mc-chat__doc:hover {
    background: rgba(255, 255, 255, 0.24);
}

.mc-chat__doc-badge {
    width: 38px;
    height: 46px;
    flex: 0 0 38px;
    border-radius: 6px 12px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: #6b7280;
}

.mc-chat__doc-badge svg {
    width: 18px;
    height: 18px;
}

.mc-chat__doc-badge--red {
    background: #dc2626;
}

.mc-chat__doc-badge--blue {
    background: #2563eb;
}

.mc-chat__doc-badge--green {
    background: #16a34a;
}

.mc-chat__doc-badge--orange {
    background: #ea580c;
}

.mc-chat__doc-badge--purple {
    background: #7c3aed;
}

.mc-chat__doc-badge--gray {
    background: #6b7280;
}

.mc-chat__doc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-chat__doc-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-chat__doc-meta {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.75;
}

.mc-chat__doc-download {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    opacity: 0.8;
}

.mc-chat__doc-download svg {
    width: 18px;
    height: 18px;
}

.mc-chat__row.is-pending .mc-chat__bubble {
    opacity: 0.92;
}

.mc-chat__upload {
    padding: 2px 6px 2px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-chat__progress {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    margin-top: 4px;
}

.mc-chat__progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: width 0.15s linear;
}

.mc-chat__progress.is-processing .mc-chat__progress-fill {
    animation: mc-chat-processing 1.1s infinite ease-in-out;
}

@keyframes mc-chat-processing {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.mc-chat__upload-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
}

.mc-chat__upload-cancel {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
}

.mc-chat__upload-cancel::after {
    content: "";
    position: absolute;
    inset: -4px;
}

.mc-chat__upload-cancel svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.mc-chat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    flex-direction: column;
    background: rgba(9, 11, 15, 0.97);
    color: #ffffff;
    font-family: inherit;
    outline: none;
}

.mc-chat-lightbox.is-open {
    display: flex;
    animation: mc-chat-fade 0.16s ease-out;
}

@keyframes mc-chat-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mc-chat-lightbox__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    position: relative;
    z-index: 2;
}

.mc-chat-lightbox__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-chat-lightbox__counter {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.7;
}

.mc-chat-lightbox__name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-chat-lightbox__btn,
.mc-chat-lightbox__nav {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: background 0.12s ease;
}

.mc-chat-lightbox__btn:hover,
.mc-chat-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.mc-chat-lightbox__btn svg,
.mc-chat-lightbox__nav svg {
    width: 22px;
    height: 22px;
}

.mc-chat-lightbox__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    position: relative;
    padding: 0 12px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.mc-chat-lightbox__img {
    max-width: min(100%, 1200px);
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
    transition: transform 0.18s ease;
    will-change: transform;
}

.mc-chat-lightbox.is-zoomed .mc-chat-lightbox__img {
    cursor: grab;
}

.mc-chat-lightbox.is-gesturing .mc-chat-lightbox__img {
    transition: none;
}

.mc-chat-lightbox.is-loading .mc-chat-lightbox__stage::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    animation: mc-chat-spin 0.8s linear infinite;
}

@keyframes mc-chat-spin {
    to {
        transform: rotate(360deg);
    }
}

.mc-chat-lightbox__failed {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

.mc-chat-lightbox.is-failed .mc-chat-lightbox__failed {
    display: inline-flex;
}

.mc-chat-lightbox.is-failed .mc-chat-lightbox__img {
    visibility: hidden;
}

.mc-chat-lightbox__nav {
    position: absolute;
    top: 50%;
    margin-top: -22px;
    z-index: 2;
}

.mc-chat-lightbox__nav[hidden] {
    display: none;
}

.mc-chat-lightbox__nav--prev {
    left: 16px;
}

.mc-chat-lightbox__nav--next {
    right: 16px;
}

@media (max-width: 575.98px) {
    .mc-chat__media--image,
    .mc-chat__media--video,
    .mc-chat__media-grid,
    .mc-chat__doc {
        width: 230px;
    }

    .mc-chat__tool {
        width: 40px;
        flex-basis: 40px;
    }

    .mc-chat__composer {
        padding: 8px 8px 10px;
    }

    .mc-chat__composer-row {
        gap: 6px;
    }

    .mc-chat__field {
        font-size: 16px;
    }

    .mc-chat-lightbox__nav {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mc-chat__rec-dot,
    .mc-chat__media.is-loading::before,
    .mc-chat__progress.is-processing .mc-chat__progress-fill,
    .mc-chat-lightbox.is-open {
        animation: none;
    }

    .mc-chat-lightbox__img,
    .mc-chat__wave-bar {
        transition: none;
    }
}

/* Horário de atendimento: bolinha verde no horário e vermelha fora dele (topo e botão). */
.mc-chat__subtitle {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.mc-chat__status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
    flex: 0 0 9px;
    margin-top: 3px;
}

.mc-chat.is-offline .mc-chat__status-dot,
.mc-chat.is-offline .mc-chat__online-dot {
    background: #ef4444;
}

.mc-chat__protocol {
    margin: 2px 0 0;
    font-size: 11px;
    line-height: 1.3;
    opacity: 0.8;
}

.mc-chat__protocol[hidden] {
    display: none;
}

/* Botões do topo: Meus atendimentos e Configurações. */
.mc-chat__head-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
}

.mc-chat__head-btn:hover,
.mc-chat__head-btn:focus-visible {
    background: rgba(255, 255, 255, 0.18);
}

.mc-chat__head-btn[hidden] {
    display: none;
}

/* Camada por cima da conversa: configurações, lista de atendimentos e conversa antiga. */
.mc-chat__sheet {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.mc-chat__sheet[hidden] {
    display: none;
}

.mc-chat__sheet-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef0f3;
}

.mc-chat__sheet-back {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
}

.mc-chat__sheet-titles {
    min-width: 0;
}

.mc-chat__sheet-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.mc-chat__sheet-subtitle {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.mc-chat__sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-chat__sheet-body > .mc-chat__messages--readonly {
    padding: 0;
    overflow: visible;
}

.mc-chat__sheet-empty {
    margin: 8px 0;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

/* Configurações: tamanho da letra e chaves. */
.mc-chat__pref-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f3;
}

.mc-chat__pref-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.mc-chat__fonts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mc-chat__font {
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #374151;
    font-weight: 700;
    cursor: pointer;
}

.mc-chat__font.is-active {
    border-color: var(--mc-chat-color);
    background: var(--mc-chat-color);
    color: #ffffff;
}

.mc-chat__font-preview {
    align-self: flex-start;
    max-width: 90%;
}

.mc-chat__pref {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eef0f3;
    cursor: pointer;
}

.mc-chat__pref-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #111827;
}

.mc-chat__pref-text strong {
    font-weight: 600;
}

.mc-chat__pref-text small {
    font-size: 11.5px;
    color: #6b7280;
}

.mc-chat__switch {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #d1d5db;
    position: relative;
    cursor: pointer;
    flex: 0 0 40px;
    margin: 0;
    transition: background 0.15s;
}

.mc-chat__switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.15s;
}

.mc-chat__switch:checked {
    background: var(--mc-chat-color);
}

.mc-chat__switch:checked::after {
    transform: translateX(18px);
}

.mc-chat__pref-note {
    margin: 4px 0 0;
    font-size: 12px;
    color: #6b7280;
}

/* Meus atendimentos: filtros por canal e cada protocolo. */
.mc-chat__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mc-chat__chip {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
}

.mc-chat__chip span {
    opacity: 0.7;
}

.mc-chat__chip.is-active {
    border-color: var(--mc-chat-color);
    background: var(--mc-chat-color);
    color: #ffffff;
}

.mc-chat__protocol-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.mc-chat__protocol-item:hover,
.mc-chat__protocol-item:focus-visible {
    border-color: var(--mc-chat-color);
}

.mc-chat__protocol-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #111827;
}

.mc-chat__tag {
    border-radius: 6px;
    padding: 2px 7px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 600;
}

.mc-chat__tag--status {
    margin-left: auto;
}

.mc-chat__tag--open {
    background: #dcfce7;
    color: #166534;
}

.mc-chat__tag--done {
    background: #f3f4f6;
    color: #4b5563;
}

.mc-chat__protocol-date {
    font-size: 11px;
    color: #6b7280;
}

.mc-chat__protocol-preview {
    font-size: 12.5px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-chat__history-more {
    align-self: center;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 16px;
    cursor: pointer;
}

.mc-chat__history-account {
    align-self: center;
    color: var(--mc-chat-color);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

/* Reações penduradas na borda de baixo do balão (metade por cima dele, como no WhatsApp): pílulas (loja e cliente), botão de reagir e a faixa de emojis */
.mc-chat__reactions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: -18px;
    padding: 0 10px;
}

.mc-chat__row--visitor .mc-chat__reactions {
    justify-content: flex-end;
}

.mc-chat__reaction-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.4;
}

button.mc-chat__reaction-pill {
    cursor: pointer;
    border-color: var(--mc-chat-color);
}

.mc-chat__reaction-add {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #9ca3af;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.mc-chat__reaction-add:hover,
.mc-chat__reaction-add[aria-expanded="true"] {
    background: #f0f1f3;
    color: #4b5563;
}

.mc-chat__reaction-picker {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    z-index: 3;
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.18);
}

.mc-chat__row--visitor .mc-chat__reaction-picker {
    left: auto;
    right: 0;
}

.mc-chat__reaction-emoji {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.mc-chat__reaction-emoji:hover,
.mc-chat__reaction-emoji.is-active {
    background: #f0f1f3;
}
