/**
 * Estilos principais para o sistema de chat com IAs
 */

/* Estilos gerais */
body {
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.conversation-list {
    max-height: calc(100vh - 200px);
}

.conversation-item {
    color: #f8f9fa;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.conversation-item.active {
    background-color: rgba(13, 110, 253, 0.5);
    color: #fff;
}

/* Container de conversa */
.conversation-container {
    height: calc(100vh - 56px);
}

.conversation-messages {
    height: 100%;
    max-height: calc(100vh - 200px);
}

/* Estilo das mensagens */
.message .message-content {
    max-width: 85%;
}

.message.user {
    text-align: right;
}

.message.user .message-content {
    background-color: #007bff;
    color: white;
    border-radius: 15px 15px 0 15px;
    margin-left: auto;
}

.message.assistant .message-content {
    background-color: #f1f1f1;
    color: #333;
    border-radius: 15px 15px 15px 0;
}

.message.system .message-content {
    background-color: #f8f9fa;
    border-radius: 15px;
    width: 100%;
}

/* Formatação de código dentro das mensagens */
pre {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    font-size: 0.9em;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
}

.message.user pre,
.message.user code {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Indicador de digitação */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 6px 0;
}

.typing-indicator span {
    height: 10px;
    width: 10px;
    float: left;
    margin: 0 1px;
    background-color: #9E9EA1;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% {
        opacity: 0.4;
        transform: translateY(0px);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
    100% {
        opacity: 0.4;
        transform: translateY(0px);
    }
}

/* Área de input */
.conversation-input {
    background-color: #fff;
}

#message-input {
    min-height: 50px;
    max-height: 150px;
    resize: none;
}

/* Adaptação para dispositivos móveis */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 1000;
        transition: left 0.3s;
        width: 80% !important;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .message .message-content {
        max-width: 90%;
    }
} 