﻿/* hidden attribute fix */
[hidden] {
    display: none !important;
}

﻿.chat-launcher {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #c0134f;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1100;
}

.chat-launcher-icon {
    font-size: 24px;
    color: #ffffff;
}

.chat-launcher-icon-arrow {
    display: none;
}

.chat-launcher.is-open .chat-launcher-icon-chat {
    display: none;
}

.chat-launcher.is-open .chat-launcher-icon-arrow {
    display: inline-block;
}

.chat-container {
    position: fixed;
    right: 32px;
    bottom: 104px;
    width: 360px;
    max-width: calc(100% - 32px);
    height: 520px;
    max-height: calc(100% - 120px);
    z-index: 1100;
    display: none;
}

    .chat-container.is-open {
        display: flex;
    }

.chat-panel {
    background: #191919;
    border-radius: 24px;
    width: 420px;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-family: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chat-header {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #151515
}

.chat-header-title {
    font-size: 16px;
    font-weight: 600;
}

.chat-header-icon-button {
    border: none;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    cursor: pointer;
}

    .chat-header-icon-button:hover {
        background: rgba(255, 255, 255, 0.08);
    }

.chat-header-button {
    border: none;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    cursor: pointer;
}

    .chat-header-button:hover {
        background: rgba(255, 255, 255, 0.08);
    }

.chat-body {
    flex: 1;
    display: flex;
    position: relative;
}

.chat-view {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
}

    .chat-view.is-active {
        display: flex;
    }

.chat-view-messages {
    display: none;
}

    .chat-view-messages.is-active {
        display: flex;
    }

.chat-view-list.is-active {
    display: flex;
}

.chat-search-wrapper {
    display: flex;
    align-items: center;
    margin-top: 12px;
    margin-right: 16px;
    margin-bottom: 4px;
    margin-left: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f0f0f0;
    width: calc(100% - 32px);
    cursor: text;
    transition: all 0.2s ease;
}

.chat-group-create-toggle {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 6px 16px;
    margin-top: 1rem;
}

.chat-group-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
}

    .chat-group-button i {
        font-size: 14px;
    }

button#chatGroupCreateCancel {
    color: #fff;
    background: #000;
}

    button#chatGroupCreateCancel:hover {
        color: #fff;
        background: #00000050;
    }

button#chatGroupManageCloseFooter {
    color: #fff;
    background: #000000;
}

    button#chatGroupManageCloseFooter:hover {
        color: #fff;
        background: #00000050;
    }

.chat-group-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.chat-group-panel {
    margin: 0 16px 8px 16px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-group-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

    .chat-group-field label {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.8);
    }

    .chat-group-field .chat-input {
        background: #f0f0f0;
        border: none;
        border-radius: 10px;
        padding: 8px 10px;
        font-size: 13px;
        color: #000;
    }

.chat-group-suggestions {
    margin-top: 6px;
    background: #ffffff;
    color: #111;
    border-radius: 10px;
    max-height: 160px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.chat-group-suggestion {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

    .chat-group-suggestion:last-child {
        border-bottom: none;
    }

    .chat-group-suggestion:hover {
        background: #f5f5f5;
    }

.chat-group-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.chat-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 12px;
}

    .chat-group-chip button {
        border: none;
        background: transparent;
        color: #ffffff;
        cursor: pointer;
        font-size: 12px;
    }

.chat-group-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.chat-group-manage {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.chat-group-manage-card {
    width: 90%;
    max-width: 360px;
    background: #1b1b1b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.chat-group-manage-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.chat-group-manage-title {
    font-weight: 600;
    font-size: 14px;
}

.chat-group-member-list {
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 10px;
    scrollbar-width: none;
}

.chat-group-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
}

.chat-group-manage .chat-group-actions {
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.chat-group-member .member-name {
    font-size: 13px;
}

.chat-group-member .member-role {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 6px;
}

.chat-group-member button {
    border: none;
    background: transparent;
    color: #ffb3b3;
    cursor: pointer;
}

.chat-search-wrapper.is-open {
    width: calc(100% - 32px);
    margin-left: 16px;
    padding: 6px 12px;
}

.chat-search-wrapper.is-hidden {
    display: none;
}

.chat-search-icon {
    margin-right: 0;
    font-size: 13px;
    color: #707070;
    flex-shrink: 0;
}

.chat-search-wrapper.is-open .chat-search-icon {
    margin-right: 6px;
}

.chat-search-input {
    border: none;
    outline: none;
    background: transparent;
    color: #111111;
    font-size: 13px;
    width: 0;
    opacity: 0;
    pointer-events: none;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.chat-search-wrapper.is-open .chat-search-input {
    width: 100%;
    opacity: 1;
    pointer-events: auto;
}

.chat-search-input::placeholder {
    color: #9f9f9f;
}

.chat-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px 8px;
}

    .chat-conversation-list::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

.chat-conversation-list {
    scrollbar-width: none;
}

.chat-group-member-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}


.chat-conversation-item {
    display: flex;
    align-items: center;
    padding: 8px 8px;
    border-radius: 10px;
    cursor: pointer;
    margin: 2px 4px;
    min-height: 56px;
    /* altura mínima fixa para todos os "boxes" */
    box-shadow: 0px 1px 0px 0px rgb(255 255 255 / 4%);
}

    .chat-conversation-item:hover {
        background: #1d1d1d;
    }

    .chat-conversation-item.is-active {
        background: #272727;
    }

.chat-conversation-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
}

    .chat-conversation-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.chat-conversation-content {
    flex: 1;
    min-width: 0;
}

.chat-conversation-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* nome não estoura o box */
}

.chat-conversation-last {
    font-size: 12px;
    color: #9f9f9f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}

.chat-conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 6px;
}

.chat-conversation-time {
    font-size: 11px;
    color: #9f9f9f;
    margin-bottom: 4px;
}

.chat-conversation-badge {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #c0134f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    padding: 0 6px;
}

.chat-conversation-header {
    background: linear-gradient(to bottom, #191919 0%, #181818 40%, #151515 100%);
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#chatMessagesWrapper::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Firefox */
#chatMessagesWrapper {
    scrollbar-width: none;
}

/* IE / Edge legado */
#chatMessagesWrapper {
    -ms-overflow-style: none;
}

.chat-send-countdown {
    font-size: 12px;
    opacity: .75;
    margin-left: 6px;
}

.chat-send-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #890147;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
    pointer-events: none;
}

.chat-back-button {
    border: none;
    background: transparent;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 6px;
}

    .chat-back-button:hover {
        background: rgba(255, 255, 255, 0.08);
    }

.chat-conversation-info {
    flex: 1;
    min-width: 0;
}

.chat-contact-name {
    font-size: 14px;
    font-weight: 600;
}

.chat-contact-status {
    font-size: 11px;
    color: #9f9f9f;
}

.chat-conversation-actions {
    display: flex;
    align-items: center;
    margin-left: 4px;
}

.chat-messages-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px 4px 12px;
    background: #191919;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message-row {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

    .chat-message-row.me {
        align-self: flex-end;
    }

    .chat-message-row.other {
        align-self: flex-start;
    }

.chat-message-bubble {
    display: inline-block;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: anywhere;
    width: auto;
}

    .chat-message-bubble.me {
        background: #c0134f;
        color: #ffffff;
        border-bottom-right-radius: 4px;
    }

    .chat-message-bubble.other {
        background: #262626;
        color: #ffffff;
        border-bottom-left-radius: 4px;
    }

.chat-message-meta {
    font-size: 10px;
    color: #9f9f9f;
    margin-top: 2px;
}

.chat-message-row.me .chat-message-meta {
    text-align: right;
}

.chat-message-row.other .chat-message-meta {
    text-align: left;
}

.chat-header-left,
.chat-header-center,
.chat-header-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header-center {
    justify-content: center;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: #151515;
}

    .chat-input-wrapper input,
    .chat-input-wrapper textarea {
        font-size: 16px !important;
        line-height: 1.4;
    }

.chat-input-toolbar {
    display: flex;
    align-items: center;
}

.chat-input-icon-button {
    border: none;
    background: transparent;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .chat-input-icon-button:hover {
        background: rgba(255, 255, 255, 0.08);
    }

.chat-quill-editor {
    background: #2a2a2a;
    border-radius: 8px;
    min-height: 38px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

    .chat-quill-editor .ql-editor {
        padding: 8px 10px;
        min-height: 38px;
        max-height: 120px;
        overflow-y: hidden;
        width: 100%;
        color: #fff !important;
        font-size: 16px;
        line-height: 1.35;
    }

        .chat-quill-editor .ql-editor p {
            margin: 0;
        }

        .chat-quill-editor .ql-editor::-webkit-scrollbar {
            width: 6px;
        }

        .chat-quill-editor .ql-editor::-webkit-scrollbar-track {
            background: transparent;
        }

        .chat-quill-editor .ql-editor::-webkit-scrollbar-thumb {
            background-color: rgba(255, 255, 255, 0.25);
            border-radius: 999px;
        }

        .chat-quill-editor .ql-editor:hover::-webkit-scrollbar-thumb {
            background-color: rgba(255, 255, 255, 0.4);
        }


.ql-editor.ql-blank::before {
    color: #fff !important;
}

#chatMessageEditor.chat-quill-editor {
    flex: 1;
    min-width: 0;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
}

    #chatMessageEditor.chat-quill-editor.ql-container {
        border: none !important;
    }

    #chatMessageEditor.chat-quill-editor .ql-editor {
        width: 100%;
        padding: 8px 10px;
        min-height: 38px;
        max-height: 120px;
        overflow-y: hidden;
        color: #fff !important;
        font-size: 15px;
        line-height: 1.35;
    }

        #chatMessageEditor.chat-quill-editor .ql-editor p {
            margin: 0;
        }

.chat-input-editor {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

    .chat-input-editor .ql-container.ql-snow {
        border: none !important;
    }

    .chat-input-editor .ql-editor {
        border: none !important;
    }

    .chat-input-editor .ql-toolbar.ql-snow {
        display: none !important;
    }

    .chat-input-editor .ql-editor.ql-blank::before {
        left: 10px !important;
        right: 10px !important;
        color: rgba(255, 255, 255, 0.55) !important;
        font-style: normal !important;
    }

.chat-input-send {
    display: flex;
    align-items: flex-end;
}

.chat-send-button {
    border: none;
    background: #c0134f;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .chat-send-button:hover {
        filter: brightness(1.1);
    }

.chat-section-title {
    margin: 4px 20px 4px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #b5b5b5;
}

.chat-popup-mode,
.chat-popup-mode body,
.chat-popup-mode html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #050505;
}

    .chat-popup-mode header,
    .chat-popup-mode footer,
    .chat-popup-mode #page-scroll,
    .chat-popup-mode #cookieBanner {
        display: none !important;
    }

    .chat-popup-mode .environment-banner {
        display: none !important;
    }

    .chat-popup-mode .chat-launcher {
        display: none !important;
    }

    .chat-popup-mode .chat-container {
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        bottom: auto;
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        display: flex;
        transform: none;
        z-index: 1100;
    }

    .chat-popup-mode .chat-panel {
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
    }

.chat-app-banner {
    display: none;
    width: 100%;
    background: #050505;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 13px;
    font-family: "Josefin Sans", sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chat-app-banner-icon {
    font-size: 15px;
    color: #c0134f;
    position: relative;
    top: -1px;
}

.chat-app-banner a {
    color: #c0134f;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.chat-popup-mode .chat-app-banner {
    display: flex;
}

.chat-conversation-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #303030;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.chat-message-status {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.85;
}

.chat-message-image {
    max-width: 100%;
    max-height: 260px;
    border-radius: 10px;
    display: block;
    margin-bottom: 4px;
}

.chat-conversation-muted {
    font-size: 12px;
    color: #9f9f9f;
}

.chat-conversation-item.is-muted .chat-conversation-name,
.chat-conversation-item.is-muted .chat-conversation-last {
    opacity: 0.7;
}

.chat-context-menu {
    position: fixed;
    min-width: 180px;
    background: #181818;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 4px 0;
    z-index: 1200;
    display: none;
}

.chat-context-menu-item {
    padding: 8px 14px;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
}

    .chat-context-menu-item:hover {
        background: #272727;
    }

.chat-search-results {
    position: relative;
    max-height: 220px;
    overflow-y: auto;
    margin: 0 16px 4px 16px;
    background: #202020;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    z-index: 1200;
}

.chat-search-result-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
}

    .chat-search-result-item:hover {
        background: #1d1d1d;
    }

.chat-search-result-name {
    font-size: 13px;
    color: #ffffff;
}

.chat-search-result-meta {
    font-size: 11px;
    color: #9f9f9f;
    margin-left: auto;
}

.app-page__content {
    height: 100%;
    min-height: 0;
}

.app-page--chat #chatContainer {
    position: relative;
    right: auto;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    display: flex;
}

    .app-page--chat #chatContainer .chat-panel {
        width: 100%;
        height: 100%;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

/* garante que o botão flutuante não apareça no app */
.app-page--chat #chatLauncher {
    display: none !important;
}

.app-page--chat {
    background: #191919;
}

.chat-container--embedded {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    display: flex;
}

.chat-panel--embedded {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.app-page--chat .app-page__content {
    background: #191919;
    padding: 0;
    margin: 0;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.app-page--chat .chat-panel {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    background: #050505;
}

.chat-input,
.chat-input input,
.chat-input textarea {
    font-size: 16px;
    line-height: 1.4;
}

/* =========================================================
   APP (EMBEDDED) OVERRIDES
   Não altera o widget. Só aplica quando usar:
   .chat-container--embedded / .chat-panel--embedded
   ========================================================= */

.app-page__body--full {
    /* garante que o container possa ocupar altura */
    min-height: 0;
}

.app-page__body.app-page__body--full {
    height: -webkit-fill-available;
    /* ajuste se seu header/footer tiver outro tamanho */
    height: inherit;
    /* ajuste se seu header/footer tiver outro tamanho */
    min-height: 0;
}

#chatContainer.chat-container--embedded {
    /* o widget normalmente é fixed + animado; no app precisa virar "normal" */
    position: relative;
    inset: auto;
    bottom: auto;
    right: auto;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    /* se o widget tiver z-index alto, aqui não precisa */
    z-index: auto;
}

    #chatContainer.chat-container--embedded.is-open {
        /* caso o widget só mostre quando "is-open", garante visível */
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }

    #chatContainer.chat-container--embedded .chat-panel--embedded {
        /* o grande segredo: virar layout flex em coluna e ocupar 100% */
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        /* remove cara de “janela flutuante” se existir no widget */
        border-radius: 0;
        box-shadow: none;
    }

    /* header fixo no topo do painel */
    #chatContainer.chat-container--embedded .chat-header {
        flex: 0 0 auto;
    }

    /* o conteúdo reutilizado precisa “crescer” e ter min-height:0 (pra overflow funcionar) */
    #chatContainer.chat-container--embedded .chat-body,
    #chatContainer.chat-container--embedded .chat-content,
    #chatContainer.chat-container--embedded .chat-panel-body {
        flex: 1 1 auto;
        min-height: 0;
    }

    /* se existir layout com sidebar + main, garante que ambos estiquem e scroll funcionem */
    #chatContainer.chat-container--embedded .chat-sidebar,
    #chatContainer.chat-container--embedded .chat-main,
    #chatContainer.chat-container--embedded .chat-conversations,
    #chatContainer.chat-container--embedded .chat-messages {
        min-height: 0;
    }

/* caso o widget esteja forçando scroll/overflow em container errado */
#chatContainer.chat-container--embedded {
    overflow: hidden;
}

.chat-conversation-info--with-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-contact-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #303030;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .chat-contact-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.chat-contact-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-contact-texts {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-message-content img {
    max-width: 220px;
    max-height: 220px;
    border-radius: 10px;
    display: block;
}

.chat-media-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
}

    .chat-media-modal.is-open {
        display: block;
    }

.chat-media-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.chat-media-modal__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.chat-media-modal__img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: contain;
}

.chat-media-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .chat-media-modal__close:hover {
        background: rgba(255, 255, 255, 0.18);
    }

.chat-attachment {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.chat-attachment-left {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.chat-attachment-middle {
    min-width: 0;
    flex: 1;
}

.chat-attachment-name {
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-attachment-download {
    border: none;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

    .chat-attachment-download:hover {
        background: rgba(255, 255, 255, 0.16);
    }

    .chat-attachment-download span {
        font-size: 12px;
        font-weight: 600;
    }

.chat-message-video {
    width: 100%;
    max-height: 260px;
    border-radius: 10px;
    display: block;
}

.chat-attachment-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.chat-message-row {
    align-items: flex-start;
}

    .chat-message-row.me {
        align-items: flex-end;
    }

.chat-message-content {
    display: inline;
}

    .chat-message-content > * {
        max-width: 100%;
    }

    .chat-message-content p {
        margin: 0;
    }

.chat-attach-preview {
    width: 100%;
    display: none;
    margin-bottom: 6px;
}

    .chat-attach-preview.is-open {
        display: block;
    }

.chat-attach-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-attach-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-attach-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.chat-attach-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-attach-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-attach-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-attach-remove {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .chat-attach-remove:hover {
        background: rgba(255, 255, 255, 0.16);
    }

.chat-attachment--file {
    cursor: pointer;
}

.chat-message-content p {
    margin: 0;
}

    .chat-message-content p + p {
        margin-top: 4px;
    }

.chat-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 16px 4px 16px;
}

    .chat-search-row .chat-search-wrapper {
        margin: 0;
        width: auto;
        flex: 1;
    }

.chat-new-group-icon {
    width: 42px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

    .chat-new-group-icon:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .chat-new-group-icon i {
        font-size: 14px;
    }

}

.chat-message-status {
    /* mantém cor como já está */
}

    .chat-message-status.is-sent,
    .chat-message-status.is-delivered,
    .chat-message-status.is-read {
        font-size: 0; /* esconde o texto sem perder o elemento */
    }

        .chat-message-status.is-sent::after {
            content: "✓";
            font-size: 12px;
        }

        .chat-message-status.is-delivered::after {
            content: "✓✓";
            font-size: 12px;
        }

        .chat-message-status.is-read::after {
            content: "✓✓";
            font-size: 12px;
            color: #2a9df4; /* azul lido (se quiser) */
        }


.message-status.is-failed {
    color: #d93025; /* vermelho Google-like */
    font-weight: bold;
}

.chat-message-input {
    width: 100%;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    line-height: 20px;
    padding: 10px 12px;
    min-height: 40px;
    max-height: 160px; /* ~8 linhas */
    overflow-y: auto;
}

@supports (-webkit-touch-callout: none) {
    .chat-input,
    .chat-search-input,
    .chat-message-input {
        font-size: 16px;
    }
}

#chatMessageEditor .ql-editor {
    font-size: 16px;
    line-height: 20px;
}

/* (conteúdo completo do seu chatWidget.css) */

/* ... SEU CSS ATUAL TODO ... */


/* ====================== COMPOSER (NO QUILL) ====================== */

.chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px;
    background: #151515;
    border-top: 1px solid rgba(255,255,255,.08);
}

.chat-composer-main {
    flex: 1 1 auto;
    min-width: 0;
    background: #191919;
    border-radius: 18px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-composer-input {
    width: 100%;
    min-height: 20px;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    line-height: 20px;
    overflow-y: hidden;
}

    .chat-composer-input::placeholder {
        color: rgba(255,255,255,.55);
    }

.chat-composer-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .chat-composer-btn:hover {
        background: rgba(255,255,255,.06);
    }

.chat-composer-send {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 0;
    background: #890147;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .chat-composer-send:hover {
        filter: brightness(1.05);
    }

.chat-file-input {
    display: none;
}

.chat-attach-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-attach-preview-item {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #151515;
    border: 1px solid rgba(255,255,255,.08);
}

    .chat-attach-preview-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.chat-attach-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    border: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 18px;
}

.chat-media-preview {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #151515;
    border: 1px solid rgba(255,255,255,.08);
}

.chat-media-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-media-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    border: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 18px;
}

/* Mensagem com media (sticker/gif) */
.chat-media-block {
    margin-bottom: 4px;
}

    .chat-media-block img {
        max-width: 220px;
        max-height: 220px;
        border-radius: 14px;
        display: block;
    }


.chat-input-editor {
    flex: 1;
    background: #1f1f1f;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    overflow: hidden;
}



/* ===================== Conversation list (WhatsApp-like) ===================== */
.chat-conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.chat-conversation-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 42px;
    background: rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-conversation-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.chat-conversation-avatar-fallback {
    font-weight: 700;
    font-size: 13px;
    color: rgba(255,255,255,.85);
}

.chat-conversation-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-conversation-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.chat-conversation-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 18px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conversation-time {
    font-size: 12px;
    opacity: .7;
    flex: 0 0 auto;
}

.chat-conversation-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-conversation-last {
    font-size: 13px;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.chat-conversation-meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chat-unread-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #25D366; /* whatsapp-like green */
    color: #0b0b0b;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
