/* Container principal de blocos */
.ems-blocks-container {
    margin: 20px 0;
}

/* Bloco individual */
.ems-block {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Cabeçalho do bloco */
.ems-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

.ems-block-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.ems-block-chat {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.ems-block-chat:hover {
    color: #0073aa;
    background: #f0f0f1;
}

/* Área de conteúdo */
.ems-block-content {
    padding: 20px;
}

.ems-block-editor {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
    resize: vertical;
}

.ems-block-editor:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.ems-block-counter {
    text-align: right;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.ems-block-counter.over-limit {
    color: #dc3232;
}

.ems-block-text {
    line-height: 1.6;
}

/* Painel de chat */
.ems-block-chat-panel {
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    background: #f8f9fa;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    margin-bottom: 10px;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 3px;
}

.chat-message.user {
    background: #e8f5fe;
    margin-left: 20px;
}

.chat-message.bot {
    background: #f0f0f1;
    margin-right: 20px;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    min-height: 60px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    resize: vertical;
}

.chat-input button {
    align-self: flex-end;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-input button:hover {
    background: #006291;
}

/* Mensagens de feedback */
.ems-block-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 3px;
    color: #fff;
    z-index: 1000;
}

.ems-block-feedback.saving {
    background: #666;
}

.ems-block-feedback.saved {
    background: #46b450;
}

.ems-block-feedback.error {
    background: #dc3232;
}