/* Chat del asistente: mismo aspecto que el de consultoriamovilidad.com (CMV/css/cmv.css) */
.chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(37,211,102,0.5);
}

.chatbot-toggle svg {
    width: 26px;
    height: 26px;
}

.chatbot-window {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    overflow: hidden;
}

.chatbot-header {
    background-color: #075E54;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.chatbot-close:hover {
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    min-height: 200px;
    background-color: #ECE5DD;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9c1b6' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-msg.bot {
    background: #fff;
    color: #333333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    position: relative;
}

.chatbot-msg.user {
    background-color: #FDE8E8;
    color: #333333;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-msg.typing {
    opacity: 0.5;
    font-style: italic;
}

.chatbot-input {
    display: flex;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.chatbot-input input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 0.875rem;
    font-family: inherit;
}
.chatbot-input input:focus {
    outline: 2px solid #075E54;
    outline-offset: -2px;
}

.chatbot-input button {
    background: none;
    border: none;
    padding: 0 14px;
    cursor: pointer;
    color: #075E54;
    display: flex;
    align-items: center;
}

.chatbot-input button:hover {
    color: #128C7E;
}

.chatbot-input button svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 62px;
        max-height: 420px;
    }
}

@media print {
    .chatbot { display: none; }
}

/* planIA: la plantilla pone los campos en blanco; aquí el texto debe verse */
.chatbot-input input {
    color: #333333 !important;
    -webkit-text-fill-color: #333333;
    background: #fff !important;
    height: auto;
}
.chatbot-input input::placeholder {
    color: #8a8a8a;
    -webkit-text-fill-color: #8a8a8a;
}
