.ck-editor__editable {
    border: 1px solid #ccc !important;
    background-color: #f1f5f9 !important;
    color: #333 !important;
    border-top: 0px !important;
    border-bottom-left-radius: .25rem !important;
    border-bottom-right-radius: .25rem !important;
    padding: 10px !important;
    font-size: 14px !important;
    min-height: 12em !important;
    max-height: 26em !important;
    overflow-y: auto !important;
}

.ck.ck-sticky-panel__content {
    border-top-left-radius: .25rem !important;
    border-top-right-radius: .25rem !important;
    border: 1px solid #ccc !important;
    border-bottom: none !important;
    background-color: #f1f5f9 !important;
}

.ck.ck-toolbar {
    background-color: #f7f7f7;
    color: #333 !important;
    border: none !important;
}

.ck.ck-toolbar .ck-button {
    color: #333 !important;
    background: transparent !important;
    border: none !important;
}

.ck.ck-toolbar .ck-button:hover,
.ck.ck-toolbar .ck-button.ck-on {
    background-color: #e0e0e0 !important;
}

.ck.ck-button__label,
.ck.ck-icon {
    color: #333 !important;
    fill: #333 !important;
}

.ck.ck-tooltip__text {
    background-color: #eee !important;
    color: #333 !important;
}

/* === Estilos para Chat da Comunidade === */

/* Container principal do chat */
.chat-container {
    height: 70vh;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Área de mensagens */
.chat-messages {
    overflow-y: auto;
    max-height: calc(70vh - 120px);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #a0aec0;
}

/* Avatar do chat */
.chat-avatar {
    width: 40px;
    height: 40px;
}

/* Imagem do chat */
.chat-image {
    max-width: 300px;
}

/* Vídeo do chat */
.chat-video {
    width: 100%;
    max-width: 400px;
    height: 225px;
}

/* Textarea do chat */
.chat-textarea {
    resize: none;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
    min-height: 38px;
    max-height: 120px;
}

/* Botão de envio do chat */
.chat-send-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:disabled {
    opacity: 0.6;
    transform: scale(1);
}

/* Mensagens do chat */
.chat-message {
    transition: background-color 0.2s ease;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 4px 0;
}

/* Efeito zebrado - mensagens alternadas */
.chat-message:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.04);
}

.chat-message:nth-child(odd) {
    background-color: transparent;
}

/* Hover state que funciona com o zebrado */
.chat-message:hover {
    background-color: rgba(255, 92, 53, 0.06) !important;
    border-left: 3px solid rgba(255, 92, 53, 0.4);
    padding-left: 9px; /* Compensar a borda */
    transition: all 0.2s ease;
}

/* Referência de resposta */
.reply-reference {
    margin-left: 40px;
    opacity: 0.8;
    position: relative;
    color: #6c757d;
    border-left: 3px solid #9ca3af !important;
}

.reply-reference:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    cursor: pointer;
    border-left-color: #ff5c35 !important;
}

.reply-content {
    white-space: pre-wrap;
    font-size: 0.9em;
}

/* Preview de resposta */
.reply-preview {
    border-left: 3px solid #ff5c35 !important;
    color: #6c757d;
    animation: slideDown 0.3s ease;
}

.reply-preview strong {
    color: #4a5568;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ações das mensagens */
.message-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-message:hover .message-actions {
    opacity: 1;
}

.message-actions .btn {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.message-actions .btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Botões de anexo */
.chat-input-container .btn-link {
    color: #6c757d;
    transition: color 0.2s ease, transform 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .chat-container {
        height: 60vh !important;
    }

    .chat-messages {
        max-height: calc(60vh - 100px) !important;
    }

    .reply-reference {
        margin-left: 20px;
    }

    .chat-message {
        padding: 6px 8px;
    }

    .chat-textarea {
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Melhorias para mensagens consecutivas do mesmo usuário */
/* .chat-message + .chat-message[data-same-user="true"] {
    margin-top: 2px;
    padding-top: 4px;
}

.chat-message + .chat-message[data-same-user="true"] .chat-avatar {
    opacity: 0.3;
    width: 30px !important;
    height: 30px !important;
} */