/* Estilos específicos do Sistema de Chat SAP-TEA */

/* Container principal do chat */
.chat-container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: 90vh;
}

/* Header do chat */
.chat-header {
    background: linear-gradient(135deg, #3DA3DC, #2E8BC0);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

/* Body do chat */
.chat-body {
    height: calc(90vh - 120px);
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* Área de validação */
.validation-area {
    padding: 40px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

/* Área do chat */
.chat-area {
    display: none;
    flex: 1;
    flex-direction: column;
}

/* Container de mensagens */
.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Estilo das mensagens */
.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message.usuario {
    flex-direction: row-reverse;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.usuario .message-bubble {
    background: linear-gradient(135deg, #3DA3DC, #2E8BC0);
    color: white;
}

.message.atendente .message-bubble {
    background: white;
    border: 1px solid #e1e5e9;
    color: #333;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

/* Área de input */
.input-area {
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    background: white;
}

/* Indicador de digitação */
.typing-indicator {
    display: none;
    padding: 10px 20px;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online { background: #28a745; }
.status-offline { background: #dc3545; }

/* Botão voltar */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .chat-container {
        margin: 10px;
        min-height: 95vh;
    }
    
    .chat-body {
        height: calc(95vh - 120px);
    }
    
    .validation-area {
        padding: 20px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
}
