/* =========================================
   BASE
========================================= */
#lcp-chat-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    color: #0E0D26;
}

.lcp-chat {
    display: flex;
    height: 600px;
}

/* =========================================
   SIDEBAR
========================================= */
.lcp-sidebar {
    width: 32%;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
}

.lcp-sidebar-header {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lcp-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0E0D26;
}

.lcp-search {
    width: 100%;
    padding: 7px 10px;
    border-radius: 999px!important;
    border: 1px solid #e5e7eb!important;
    font-size: 13px;
    outline: none;
    background: #ffffff;
}

.lcp-search:focus {
    border-color: #50F2F2!important;
    box-shadow: 0 0 0 1px rgba(79,70,229,.25);
}

.lcp-user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

.lcp-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .2s!important;
    margin: 10px 15px;
    border-radius: 15px;
    background: #F4F4FB;
}

.lcp-user-item:hover,
.lcp-user-item.lcp-active-user {
    background: #50F2F2;
}

.lcp-user-avatar img {
    border-radius: 999px!important;
    margin-top: 5px;
}

.lcp-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex: 1;
}

/* Nome + prévia em coluna */
.lcp-user-texts {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.lcp-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #0E0D26;
}

/* Prévia da conversa (estilo WhatsApp) */
.lcp-user-preview {
    font-size: 12px;
    color: #5D5D5D;
    margin-top: 2px;
    display: block;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge de novas mensagens */
.lcp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
padding: 0 6px 1px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

/* =========================================
   MAIN
========================================= */
.lcp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
}

/* Header */
.lcp-main-header {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.lcp-main-avatar img {
    border-radius: 999px;
}

.lcp-main-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
}

.lcp-main-name {
    font-size: 15px;
    font-weight: 600;
    color: #0E0D26;
}

/* =========================================
   MENSAGENS
========================================= */
.lcp-messages {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lcp-empty-state {
    margin: auto;
    color: #6b7280;
    font-size: 14px;
}

.lcp-date-divider {
    align-self: center;
    margin: 8px 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(209,213,219,0.6);
    font-size: 11px;
    color: #374151;
}

.lcp-msg-row {
    display: flex;
}

.lcp-msg {
    max-width: 70%;
    padding: 8px 10px 6px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.lcp-msg-mine {
    margin-left: auto;
    background: #50F2F2;
    color: #0E0D26;
    border-bottom-right-radius: 4px;
}

.lcp-msg-other {
    margin-right: auto;
    background: #0E0D26;
    color: #ffffff;
    border-bottom-left-radius: 2px;
}

.lcp-msg-time {
    font-size: 11px;
    align-self: flex-end;
    opacity: 0.7;
}

/* =========================================
   FORM – LINHA: INPUT - EMOJI - ENVIAR
========================================= */

.lcp-form {
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative;
}

#lcp-input {
    flex: 1 !important;
    height: 50px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    background: #f9fafb;
}

#lcp-input:focus {
    border-color: #50F2F2;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(79,70,229,.15);
}

/* Botões ao lado um do outro */
.lcp-form-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Botão emoji */
#lcp-emoji-btn {
    background: #f3f4f6;
    border: none;
    border-radius: 999px!important;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
}

/* Botão enviar */
#lcp-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px 2px 0 0;
    overflow: hidden;
    transition: background .2s, opacity .2s;
}

#lcp-send-btn:hover {
    opacity: 0.8;
    background: #50F2F2;
}

#lcp-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

#lcp-send-btn .lcp-send-icon {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
}

/* =========================================
   PAINEL DE EMOJIS – abre acima do emoji-btn
========================================= */

.lcp-emoji-panel {
    position: absolute;
    bottom: 55px;
    right: 70px;
    width: 180px;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,.1);
    z-index: 50;
}

.lcp-emoji-item {
    border: none;
    background: transparent!important;
    cursor: pointer;
    font-size: 20px;
    padding: 2px!important;
}


/* =========================================
   TOAST
========================================= */
#lcp-toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.lcp-toast {
    min-width: 280px;
    max-width: 360px;
    background: #ffffff;
    color: #0E0D26;
    padding: 15px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 15px 25px rgba(0,0,0,.35);
    cursor: pointer;
    font-size: 14px;
}

.lcp-toast-close {
    border: none;
    background: #50F2F2!important;
    color: #0E0D26!important;
    font-size: 16px;
    cursor: pointer;
    padding: 0 7px 4px !important;
    line-height: 1.0 !important;
}

/* Scrollbar */
.lcp-messages::-webkit-scrollbar,
.lcp-user-list::-webkit-scrollbar {
    width: 6px;
}

.lcp-messages::-webkit-scrollbar-thumb,
.lcp-user-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

/* =========================================
   MENU SUPERIOR
========================================= */
.lcp-menu-wrapper {
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
}

.lcp-menu-btn {
    font-size: 24px!important;
    cursor: pointer;
    padding: 6px 10px!important;
    border-radius: 10px!important;
    border: none!important;
    background: transparent!important;
    transition: background .2s;
}

.lcp-menu-btn:hover {
    background: #e5e7eb;
}

.lcp-menu-dropdown {
    position: absolute;
    right: 0;
    top: 110%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    display: none;
    z-index: 999;
    min-width: 160px;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

.lcp-menu-wrapper.lcp-menu-open .lcp-menu-dropdown {
    display: block;
}

.lcp-menu-item {
    width: 100%;
    padding: 10px 15px!important;
    border: none!important;
    background: transparent!important;
    text-align: left!important;
    font-size: 14px!important;
    cursor: pointer;
}

.lcp-menu-item:hover {
    background: #f3f4f6;
}

/* =========================================
   RESPONSIVO
========================================= */
@media (max-width: 800px) {
    .lcp-chat {
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
    }

    .lcp-sidebar {
        width: 100%;
        height: 45%;
    }

    .lcp-main {
        height: 55%;
    }

    #lcp-chat-wrapper {
        margin: 0;
    }

    .lcp-emoji-panel {
        right: 20px;
    }
}
