/* Caminho: modules/rbagentetecnico/views/css/chat.css */

#rb-agente-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    z-index: 999999; /* Força o chat a ficar por cima de todo o rodapé */
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 5px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
}

#rb-agente-container img {
    display: none;
}

#rb-agente-header {
    background-color: #2c3e50;
    color: white;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

#rb-chat-body {
    display: flex;
    flex-direction: column;
    height: 450px;
    background-color: #ffffff;
    position: relative;
    z-index: 2; /* Mantém fundo branco bloqueando o rodapé */
}

#rb-chat-messages{
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.rb-mensagem {
    padding: 10px 12px;
    border-radius: 8px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.rb-msg-ia {
    background-color: #e3f2fd;
    color: #0d47a1;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.rb-msg-utilizador {
    background-color: #4caf50;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

#rb-chat-input-area {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

#rb-chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
}

#rb-chat-send {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-left: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#rb-chat-send:hover {
    background-color: #1a252f;
}
    /* Estilos das Abas */
#rb-tabs {
    display: flex;
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
}
.rb-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
}
.rb-tab-btn.active {
    background: #fff;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
}
.rb-tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    height: 100%;
}
.rb-tab-content.active {
    display: flex;
}

/* Estilos da Calculadora */
.rb-calc-container {
    padding: 15px;
    overflow-y: auto;
}
.rb-calc-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}
.rb-calc-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#rb-calcular-ohm {
    width: 100%;
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}
#rb-calcular-ohm:hover {
    background-color: #218838;
}
#rb-resultado-ohm {
    margin-top: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 5px;
    font-size: 14px;
    display: none; /* Escondido até ter resultado */
}
.rb-res-destaque { font-weight: bold; color: #d32f2f; }
.rb-res-produto { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ccc; color: #0073e6; font-weight: bold;
}

/* ==========================================
   ESTILOS DA CENTRAL DE CÁLCULO TÉCNICO
   ========================================== */

/* Seletor de Ferramentas (Dropdown) */
#rb-calc-selector {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

#rb-calc-selector:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 5px rgba(44, 62, 80, 0.3);
}

/* Linha separadora do menu */
.rb-calc-container hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin-bottom: 15px;
}

/* Botões de Cálculo Principais */
.rb-btn-calc {
    width: 100%;
    background-color: #0073e6; /* Azul para ações de cálculo */
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.rb-btn-calc:hover {
    background-color: #005bb5;
}

/* Caixa de Resultados da Central Técnica */
#rb-resultado-tecnico {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa; /* Fundo levemente cinza */
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* ==========================================
   BOTÃO DE ADICIONAR AO CARRINHO (CTA)
   ========================================== */

.rb-produto-sugerido {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.rb-produto-sugerido p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #2c3e50;
}

.rb-btn-carrinho {
    width: 100%;
    background-color: #28a745; /* Verde Sucesso padrão de e-commerce */
    color: white;
    border: none;
    padding: 12px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rb-btn-carrinho:hover {
    background-color: #218838;
    transform: translateY(-2px); /* Efeito do botão "levantar" ao passar o mouse */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.rb-btn-carrinho:active {
    transform: translateY(0); /* Efeito de clique */
}