/* --- COLORES CAJA CARACAS (VERDE: #00953B) --- */

#mcs-open-btn {
    position: fixed;
    bottom: 20px; right: 20px;
    background: #00953B; /* VERDE */
    color: white;
    padding: 12px 20px;
    border: none; border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 149, 59, 0.3);
    z-index: 9999;
    font-size: 14px; font-weight: bold;
    display: flex; align-items: center;
}

#mcs-chat-container {
    display: none;
    position: fixed;
    bottom: 80px; right: 20px;
    width: 320px; height: 450px;
    background: white;
    border: 1px solid #e1e1e1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 12px;
    overflow: hidden;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
    display: flex; flex-direction: column;
}

/* CABECERA VERDE */
#mcs-chat-header {
    background: #00953B;
    background: linear-gradient(135deg, #00953B 0%, #007a30 100%);
    color: white;
    padding: 15px;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.header-title { font-weight: 600; font-size: 15px; }
#mcs-close { cursor: pointer; font-size: 18px; opacity: 0.8; }
#mcs-close:hover { opacity: 1; }

/* ÁREA DE MENSAJES */
#mcs-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f4f6f8;
    display: flex; flex-direction: column; gap: 12px;
}

/* AVATAR Y FILAS */
.bot-row {
    display: flex;
    align-items: flex-end; /* Alinear avatar abajo */
    gap: 8px;
    margin-bottom: 5px;
}

.bot-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    padding: 2px;
    object-fit: contain;
}

/* BURBUJAS */
.bot-msg {
    background: white;
    color: #333;
    padding: 10px 14px;
    border-radius: 12px 12px 12px 0; /* Pico abajo izquierda */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 13px;
    line-height: 1.4;
    max-width: 80%;
}

.user-msg {
    background: #00953B; /* Burbuja usuario VERDE */
    color: white;
    padding: 10px 14px;
    border-radius: 12px 12px 0 12px; /* Pico abajo derecha */
    align-self: flex-end;
    font-size: 13px;
    max-width: 80%;
    box-shadow: 0 2px 5px rgba(0, 149, 59, 0.2);
}

/* BOTONES (CHIPS) */
.mcs-options-container {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-left: 40px; /* Para alinear con texto del bot */
}

.mcs-option-btn {
    background: white;
    border: 1px solid #00953B;
    color: #00953B;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.mcs-option-btn:hover { background: #00953B; color: white; }

/* ENLACE DENTRO DEL TEXTO */
.mcs-link-btn {
    display: inline-block;
    background: #00953B;
    color: white !important;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 5px;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
}
.mcs-link-btn:hover { background: #007a30; }

/* INPUT AREA */
#mcs-input-area {
    background: white;
    border-top: 1px solid #eee;
    padding: 10px;
    display: flex; align-items: center;
    height: 60px; flex-shrink: 0;
}
#mcs-user-input {
    flex-grow: 1; border: 1px solid #ddd;
    border-radius: 20px; padding: 8px 15px;
    font-size: 13px; outline: none; background: #f9f9f9;
}
#mcs-user-input:focus { background: white; border-color: #00953B; }
#mcs-send-btn {
    background: #00953B; color: white;
    border: none; padding: 8px 15px;
    border-radius: 20px; margin-left: 8px;
    font-size: 12px; font-weight: bold; cursor: pointer;
}

/* --- ANIMACIÓN ESCRIBIENDO (PUNTITOS SALTANDO) --- */
#mcs-typing-container {
    display: flex; align-items: flex-end; gap: 8px;
    padding: 0 15px 10px 15px;
}
.typing-bubble {
    background: white;
    padding: 10px 15px;
    border-radius: 12px 12px 12px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex; gap: 4px; height: 15px; align-items: center;
}
.dot {
    width: 6px; height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* FORMULARIO ESTILO LIMPIO */
.mcs-lead-form {
    background: #fff;
    border: 1px solid #cce5ff;
    padding: 15px;
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    max-width: 100%; /* Asegura que el form no crezca más de la cuenta */
    box-sizing: border-box; /* Asegura que el padding no rompa el ancho */
}

.mcs-lead-input {
    width: 100%;
    box-sizing: border-box; /* <--- ¡ESTA ES LA CLAVE! Arregla el desborde */
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 13px;
}

.mcs-lead-input:focus {
    border-color: #00953B;
    background: #fdfdfd;
}

.mcs-lead-submit {
    width: 100%;
    box-sizing: border-box; /* También se lo ponemos al botón por si acaso */
    background: #00953B;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.2s;
}

.mcs-lead-submit:hover {
    background: #007a30;
}